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

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.
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,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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