Forum Discussion
Change a cell name based on a duplicated value
Hi!
Can anyone help me solving an issue?
I need all cell values from column 1 to be replaced to have the same name if the cell values from column 2 are the same (example below).
| GROUP | CODE | SUM |
| MICROSOFT | 101245128587-7781.777 | 35 |
| EXCEL | 101245128587-7781.777 | 48 |
| WORD | 101245128587-7781.777 | 21 |
If the "CODE" is the same in those cells:
- change the "GROUP" name to either "MICROSOFT" ; "EXCEL" or "WORD"
'' it doesn't matter which, the only thing that I want is the same name for both after a certain logic/code...
'' the code needs to work with a large database not only in this case. This is only an example of some duplicated values.
Thanks in advance!
3 Replies
- OliverScheurichGold Contributor
=IF(COUNTIF($B$2:$B$13,B2)>1,"Excel",A2)Maybe with this formula which seems to work in my sheet.
- ccgbalarinCopper Contributor
Thanks for the input, that would work if I was looking for a fixed value if the condition is true, and if my database was small.
GROUP CODE SUM MICROSOFT 101245128587-7781.777 35 EXCEL 926348178587-8817.987 48
WORD 101245128587-7781.777 21
POWERPOINT 517398175634-2616.827 52
SQL 926348178587-8817.987 10
My original sheet looks more like this (+2000 rows). How do I change “SQL” to “EXCEL” for example while also changing “WORD” to “MICROSOFT” because they share the same code? Is there a formula for this?
- OliverScheurichGold Contributor
Doesn't the formula for your first question work for a large database in your sheet? I've tried it for 1300 rows and it works perfectly in my sheet.
For your second question (your original sheet in which you want to return multiple groups) you can try this formula.
=IF(COUNTIF($B$2:B2,B2)>1,INDEX($A$2:A2,MATCH(B2,$B$2:B2,0)),A2)