Change a cell name based on a duplicated value

Copper Contributor

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).

 

GROUPCODESUM
MICROSOFT101245128587-7781.777                          35
EXCEL101245128587-7781.777

                          48

WORD101245128587-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

@ccgbalarin 

=IF(COUNTIF($B$2:$B$13,B2)>1,"Excel",A2)

Maybe with this formula which seems to work in my sheet. 

@OliverScheurich 

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.

 

GROUPCODESUM
MICROSOFT101245128587-7781.777                          35
EXCEL926348178587-8817.987

                          48

WORD101245128587-7781.777

21

POWERPOINT517398175634-2616.827

52

SQL926348178587-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?

@ccgbalarin 

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)