I creating a sequenial number from the previous filled cell

sailingaway

New Member
Joined
Nov 21, 2012
Messages
2
I am trying to match two cells and put a unique number next to it. I have managed to recognize the two requirements and not fill the other cells unnecessarily but my equation will only output 1 and I cannot get it to add one to the previous cell that has a number, to end up with 2,3...


=IF(COUNT(IF(AND(B2=Sheet1!$A$5,'DRS Output'!L2=Sheet1!$B$5),MAXA($A$1:A1)+1,""))=0,"",COUNT(IF(AND(B2=Sheet1!$A$5,'DRS Output'!L2=Sheet1!$B$5),Maxa($A$1:A1)+1,"")))






 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I am trying to match two cells and put a unique number next to it. I have managed to recognize the two requirements and not fill the other cells unnecessarily but my equation will only output 1 and I cannot get it to add one to the previous cell that has a number, to end up with 2,3...


=IF(COUNT(IF(AND(B2=Sheet1!$A$5,'DRS Output'!L2=Sheet1!$B$5),MAXA($A$1:A1)+1,""))=0,"",COUNT(IF(AND(B2=Sheet1!$A$5,'DRS Output'!L2=Sheet1!$B$5),Maxa($A$1:A1)+1,"")))







you should be getting the MAXA() of the same column where you have the output of 1s..
 
Upvote 0
Yes i see could you recomend a different function to use on this equation.

so whenever the value in column B is equal to Sheet1!$A$5 and the value in column L is equal to Sheet1!$B$5, generate an increasing index?

say, put the following formula in column L:
=IF(AND(B2=Sheet1!$A$5,L2=Sheet1!$B$5), MAX($L$1:L1)+1,"")
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,824
Members
449,470
Latest member
Subhash Chand

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