SOLVED

Excel Formula Help

Occasional 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 Sergei Baklan (MVP)
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