Autonumbering cells

tigerdel

Board Regular
Joined
Oct 13, 2015
Messages
145
Office Version
  1. 365
Platform
  1. Windows
Good Afternoon Experts

I am trying to have excel auto number a cell if another cell is not blank but if I then insert a new row it adjusts the numbers.

As an example, in the image attached, I want Cell B10 to be 1 the following cells to increment by 1 but if I insert a new Row at say B13 it will rearrange the numbers so that B13 would be 4 and so on.

I tried the formula: =IF(ROW(id)=ROW($B$8)+2,1,MAX(prev_col_range)+1)
id = named range of $B10
prev_col_range = $B$8:$B73

It seems to work OK for B10 [gives it the number 1 but when I copy it down it numbers all cells as 1
I would also like that of the adjacent cell in column F is empty it leaves the cell blank

Any help with this would be greatly appreciated

Thanks for looking
 

Attachments

  • Untitled.png
    Untitled.png
    14.5 KB · Views: 8

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,215,149
Messages
6,123,311
Members
449,095
Latest member
Chestertim

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