Fill down ignoring blank rows

zookeepertx

Well-known Member
Joined
May 27, 2011
Messages
568
Office Version
  1. 365
Platform
  1. Windows
Hello all!
I have a weird question and hoping it will be easy to solve.
If I have a list of data and I have a blank row each time the data in column A changes. I want to number each data row incrementally in column H but not have the blank rows included in the numbering. More than half the time, there will only be 1 row of data before the data in A changes, so H would contain - for example - 1, blank, 2, blank, 3.....
However, sometimes there will be several rows where A has the same number and I need each of those rows to have the same number in H.

For example:
ABCDEFGH
red1
green2
blue3
blue3
blue3

Its fine if it just takes a formula because I can just "copy/paste special value" the numbers back into H .

Is there a way to do this without it becoming too complicated of a process?

Thanks for any help you can offer.

Jenny
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
How about
+Fluff 1.xlsm
ABCDEFGH
1Colour
2red1
3 
4green2
5 
6blue3
7blue3
8blue3
Primary
Cell Formulas
RangeFormula
H2:H8H2=IF(A2="","",COUNTBLANK(A$1:A1)+1)
 
Upvote 0
Solution
How about
+Fluff 1.xlsm
ABCDEFGH
1Colour
2red1
3 
4green2
5 
6blue3
7blue3
8blue3
Primary
Cell Formulas
RangeFormula
H2:H8H2=IF(A2="","",COUNTBLANK(A$1:A1)+1)
Awesome! Thank you so much! (I'm looking at about 900 lines and really didn't want to key them all by hand, LOL!)

Jenny
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,661
Messages
6,120,797
Members
448,994
Latest member
rohitsomani

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