Hi.
If we have several names in a column in a excel worksheet which are repeated again n again how can we number them??
so that if we are using a vlookup function or sum other we don't get the same data displayed
Hi.
If we have several names in a column in a excel worksheet which are repeated again n again how can we number them??
so that if we are using a vlookup function or sum other we don't get the same data displayed
Last edited by Munni; 06-24-2010 at 01:29 AM.
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.
If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
Doing this will ensure you get the result you need!
Let's say the names are in column A starting at A2. In B2 you could enter this formula:
=IF(COUNTIF($A$1:$A2, $A2) = 1, $A2, $A2 & "(" & COUNTIF($A$1:$A2, $A2) & ")")
Copy that cell downward to get a new list with numbers added to the duplicated values. Use that column for your VLOOKUP since it now has unique values on every row.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
=countif($a$2:a2,a2)&"-"&a2
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks