SOLVED

Excel Formula Help

Copper Contributor

I have a report that Column C is Invoice Number and then for Column D, is Line Number. Line Number could be 1 or 2, depending on if Column C Invoice Number is listed multiple times.

Example would :

Row 1 - Column C has invoice number: 7104

Row 2 - Column C has invoice number: 7122

Row 3 - Column C has invoice number: 7122

Row 4 - Column C has invoice number: 7123

Row 5 - Column C has invoice number: 7125

 

So Column D would need to be:

Row 1 - 1

Row 2 - 1

Row 3 - 2

Row 4 - 1

Row 5 - 1

 

Is there a Countif formula or a vba script that I could use to populate Column D based on Column C?

Thank you!

2 Replies
best response confirmed by VI_Migration (Silver Contributor)
Solution

@Dfuhrman8 

=COUNTIF($C$1:C1,C1)

Maybe with this formula.

excel formula.JPG 

Thank you! I wasnt adding the "$" and it was not working.
That is exactly what I wanted
1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

@Dfuhrman8 

=COUNTIF($C$1:C1,C1)

Maybe with this formula.

excel formula.JPG 

View solution in original post