98.8% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » return line number within a range
return line number within a range
Resolved · Low Priority · Version 365
Chris has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Excel Intermediate course
Excel Dashboards for Business Intelligence course
Advanced Excel Dashboards course
Excel PowerPivot course
Excel Advanced - Formulas & Functions course
Excel Charting course
return line number within a range
I am trying to find a formula to put into column C to return the line line of a contract line item within the range of Customer ID (Row B). See desired result in row D. Thank you.
Customers ID Contract line No Contract line No desired result
6978 1
6978 2
6978 3
6978 4
6978 5
6978 6
6978 7
6979 1
6980 1
6981 1
6982 1
11081 1
11505 1
11557 1
14203 1
14614 1
14769 1
14944 1
14945 1
14946 1
15601 1
16006 1
RE: return line number within a range
Hi Chris,
Thank you for the forum question.
If you have column B sorted ascending or descending try:
=IF(B1=B2,C1+1,1)
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
RE: return line number within a range
Hi Chris,
Or even better (now column B doesn't need to be sorted)
=COUNTIF($B$2:B2,B2)
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Add Text to Displayed Numbers in Excel 2010To add text to a number in a cell, you need to go to the Home tab on the Ribbon, and click on the Cells group. Select Format Cells from the drop down menu then Custom from the Category list. In the Type box select General. After the word General, enter a space, then opening quotation marks, then the word you want to type and then closing quotation marks. Click on OK and you have your text! |