Updating serial in row

Sheroo318

New Member
Joined
Aug 27, 2014
Messages
15
I would like that when user selects the row in active worksheet and clear its contents, that subsequent cells will update itself with the new serial number
for e.g.
if column A range A1 to A5 has serials 1 to 5 and user decides for A3 to clear its contents, then I would like that A4 will show the new serial 3 and A5 showing 4 (instead of the original value 4 and 5 respectively)
 
Maybe events are disabled. In the VBE Immediate window type:

Application.EnableEvents = True

and press Enter.
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hey Andrew,
the part where if .value = "" then entirerow delete doesn't work or at least most of the time it doesn't
I have replaced the "" with "a" and then it will detect the change and carry out the delete of the row, but with the phrase if blank is not scanning or detecting the function.
Any thoughts?
 
Upvote 0
yes, i just took your code copy and paste.
It sometimes will work once and stop updating and usually it iwll just update the numbering sequence but not delete the rows..only if i changed the .value = "" to .value = "a" or any other text, then excel will properly detect the code (by checking if value is a or not) and delete the rows
 
Upvote 0

Forum statistics

Threads
1,215,494
Messages
6,125,137
Members
449,207
Latest member
VictorSiwiide

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top