Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2020, 09:20 AM
kingston123 kingston123 is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2013
Advanced Beginner
Deleted entire row, but numbering series gone wrong. Help me.
 
Join Date: Sep 2018
Posts: 85
kingston123 is on a distinguished road
Default Deleted entire row, but numbering series gone wrong. Help me.

I deleted entire 45th row, now numbering series gone wrong.



Reply With Quote
  #2  
Old 06-23-2020, 09:28 AM
Logit Logit is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

See if this helps :

How to number rows after inserting or deleting rows automatically in Excel?
Reply With Quote
  #3  
Old 06-23-2020, 08:02 PM
kingston123 kingston123 is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2013
Advanced Beginner
Deleted entire row, but numbering series gone wrong. Help me.
 
Join Date: Sep 2018
Posts: 85
kingston123 is on a distinguished road
Default

Quote:
Originally Posted by Logit View Post
Look at comments of that page, "if i delete the row, is there any possibility to set below numbers are in serial". They are still posting questions means your link didn't help me.
Reply With Quote
  #4  
Old 06-23-2020, 08:43 PM
Logit Logit is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
By slightly editing the posted macro, you can achieve the goal you desire :

Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim I As Integer
    I = 1
    Application.EnableEvents = False
    For I = 1 To 50
        Range("A" & I).Value = I - 1
    Next
    Application.EnableEvents = True
End Sub
The above is designed to delete one row at a time and still maintain the
correct numbering in your column. Your original post indicated you are
deleting one row at a time.

It has been a pleasure helping you. Stay healthy !
Reply With Quote
  #5  
Old 06-24-2020, 03:48 AM
kingston123 kingston123 is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2013
Advanced Beginner
Deleted entire row, but numbering series gone wrong. Help me.
 
Join Date: Sep 2018
Posts: 85
kingston123 is on a distinguished road
Default

Where should I enter this code? How to activate it?
Reply With Quote
  #6  
Old 06-24-2020, 08:05 AM
Logit Logit is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
Paste the code in the Sheet module, of the sheet you want it applied to.

It functions automatically when a row is deleted. You won't have to do anything.

This line in the code : For I = 1 To 50 can be changed if you want the number
of affected rows changed. For example, if you want it applied to 100 rows, change the
50 to 100. If want it applied to just the first 20 rows, change the 50 to 20.
Reply With Quote
  #7  
Old 06-24-2020, 08:43 AM
kingston123 kingston123 is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2013
Advanced Beginner
Deleted entire row, but numbering series gone wrong. Help me.
 
Join Date: Sep 2018
Posts: 85
kingston123 is on a distinguished road
Default

Quote:
Originally Posted by Logit View Post
.
Paste the code in the Sheet module, of the sheet you want it applied to.
should I copy your code in this sheet module?:





If not, show me correct sheet module.
Reply With Quote
  #8  
Old 06-24-2020, 09:09 AM
Logit Logit is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
If that is the Sheet that you want the macro code to work on. Yes
Reply With Quote
  #9  
Old 06-24-2020, 10:00 AM
kingston123 kingston123 is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2013
Advanced Beginner
Deleted entire row, but numbering series gone wrong. Help me.
 
Join Date: Sep 2018
Posts: 85
kingston123 is on a distinguished road
Default

Quote:
Originally Posted by Logit View Post
.
If that is the Sheet that you want the macro code to work on. Yes

Why I am getting this error while I am saving your code?



Reply With Quote
  #10  
Old 06-24-2020, 10:11 AM
Logit Logit is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
You need to save the workbook as macro-enabled.

Click NO, then in the small window that opens ... choose File Type as .XLSM
Reply With Quote
  #11  
Old 06-24-2020, 10:24 AM
kingston123 kingston123 is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2013
Advanced Beginner
Deleted entire row, but numbering series gone wrong. Help me.
 
Join Date: Sep 2018
Posts: 85
kingston123 is on a distinguished road
Default

Quote:
Originally Posted by Logit View Post
.
You need to save the workbook as macro-enabled.

Click NO, then in the small window that opens ... choose File Type as .XLSM

Yes I saved my file as XLSM, saved your code in my worksheet, still numbering series didn't change:






still its showing 46 instead of 45.
Reply With Quote
  #12  
Old 06-24-2020, 11:14 AM
Logit Logit is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
Can you post your workbook ?
Reply With Quote
  #13  
Old 06-24-2020, 11:40 AM
Logit Logit is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Disregard posting your workbook.

Let's try a formula instead of the macro.

If you don't have a header in A1, paste the following formula in A1. If you do have a
header, then paste the formula in A2.

If A1 : =IF(ISBLANK(B1)," ",COUNTA($B$1:B1))

If A2 : =IF(ISBLANK(B2)," ",COUNTA($B$2:B2))

Once you have the formula in the cell, click on the cell and a small dot will appear
in the lower right hand corner of the cell. Hover your cursor over that tiny black
dot until the cursor becomes a cross symbol. While it remains the cross, double
click the dot. The formula should auto-fill all the cells in Col A that are adjacent
to a cell in Col B that has some data.

Be sure to delete the macro from the worksheet module.
Reply With Quote
  #14  
Old 06-24-2020, 08:26 PM
kingston123 kingston123 is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2013
Advanced Beginner
Deleted entire row, but numbering series gone wrong. Help me.
 
Join Date: Sep 2018
Posts: 85
kingston123 is on a distinguished road
Default

Quote:
Originally Posted by Logit View Post
Disre......heet module.
My problem is arrives at A58 but you are saying A2 & B2, I am confused.
Reply With Quote
  #15  
Old 06-24-2020, 08:39 PM
Logit Logit is offline Deleted entire row, but numbering series gone wrong. Help me. Windows 10 Deleted entire row, but numbering series gone wrong. Help me. Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
What Column and what starting and ending cell do you want the auto numbering to work ?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Occurence appt invitees showing on entire series doresa69 Outlook 0 11-11-2016 01:32 PM
Deleted entire row, but numbering series gone wrong. Help me. Series numbering ericjowens Excel 2 09-03-2015 11:20 AM
deleted items in wrong mailbox Flip Outlook 2 03-12-2014 03:51 AM
Deleted entire row, but numbering series gone wrong. Help me. Header numbering is wrong Scaffold Word 2 02-13-2014 03:08 AM
Continue Auto Numbering Throughout Entire Presentation craigfu PowerPoint 3 05-04-2012 05:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft