Auto fill Numbers

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,791
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Can any one help me I need a formula, that fills numbers if the corresponding cell has a value. So if B3 has firs value A3 will fill 1, and B6 has second value A6 will fill 6, so one.
I knew this formula, it was =COUNTA formula.

Thanks
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Do you mean perhaps?

=If(Isnumber(A1),row(A1),"") copied down.
 

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,791
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
No, it was something like, if I enter any number or text in a cell say B8, A8 fills the serial number, and if I fill next in B12 A12 fills 2, in it, so it is like IF B8>"", FILL 1 OR LEVE IT BLANK. so on. It will leave cell blank if the corresponding cell is empty or increase the number by one.
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Then maybe?

=IF($B1<>"",COUNTA($B$1:$B1),"") copied down
 

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,791
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
THANK YOU VERY MUCH,
This is one of my favourite formulas. I will not foget it again.
thanks again NBVC
 

Watch MrExcel Video

Forum statistics

Threads
1,114,041
Messages
5,545,679
Members
410,697
Latest member
srishtijain0708
Top