Auto numbering of rows basing on true values

masud8956

Board Regular
Joined
Oct 22, 2016
Messages
163
Office Version
  1. 2016
  2. 2011
  3. 2007
Platform
  1. Windows
Hi,

I have a table where I import data from other worksheets. Column A is for row numbers. I have other data in columns B, C and D.

A3 B3 C3 D3
1 ...x...y...z
2....p...q...r

I need a formula to populate column A automatically with chronological row numbers when there is data in either B/C/D.

Anyone?
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Thanks!

My actual range is C90:Q4089. I want the Row numbers in Column B (Row number 1 at B90 and so on)

I tried
Code:
=IF(COUNTA(C90:Q4089)<>0,MAX(B$90:$B90)+1,"")
and
Code:
=IF(COUNTA(C90:Q4089)<>0,MAX(B$89:$B89)+1,"")
both separately but getting a return of "0"
 
Upvote 0
Put in B90 and fill down :

=IF(COUNTA(C90:Q90)<>0,MAX($B$89:B89)+1,"")
 
Upvote 0
Put in B90 and fill down :

=IF(COUNTA(C90:Q90)<>0,MAX($B$89:B89)+1,"")

Thanks. It worked. But it keeps returning value against blank rows as well. Is there a way it stops generating numbers upon hitting a blank row in the range
 
Upvote 0
Thanks. It worked. But it keeps returning value against blank rows as well. Is there a way it stops generating numbers upon hitting a blank row in the range

If a number is being returned, it means the row is not blank - i.e at least one of the cells in columns C:Q of that row contains something.
 
Upvote 0
If a number is being returned, it means the row is not blank - i.e at least one of the cells in columns C:Q of that row contains something.

Ok. I see it now.

Actually those cells have got formulas something like
Code:
=IF(IFERROR(INDEX(DATA!C$2:C$4001,SMALL(IF(DATA!$C$2:$C$4001>=$R$9,IF(DATA!$C$2:$C$4001<=$R$11,ROW(DATA!$C$2:$C$4001)-ROW(DATA!$C$2)+1)),ROWS(R$9:R9))),"")=0,"",IFERROR(INDEX(DATA!C$2:C$4001,SMALL(IF(DATA!$C$2:$C$4001>=$R$9,IF(DATA!$C$2:$C$4001<=$R$11,ROW(DATA!$C$2:$C$4001)-ROW(DATA!$C$2)+1)),ROWS(R$9:R9))),""))

Does it mean the cell will be treated as "containing something" even if the cell formula returning nothing?
 
Upvote 0
=if(countif(c90:q90,"")<>15,max($b$89:b89)+1,"")
 
Upvote 0
Hi,

I have a table where I import data from other worksheets. Column A is for row numbers. I have other data in columns B, C and D.

A3 B3 C3 D3
1 ...x...y...z
2....p...q...r

I need a formula to populate column A automatically with chronological row numbers when there is data in either B/C/D.

Anyone?

In either way
U can use the formula =if(B2="","",A1+1) Drag for respective cells also.
 
Upvote 0

Forum statistics

Threads
1,214,391
Messages
6,119,244
Members
448,879
Latest member
VanGirl

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