Page 1 of 1

Excel Formula Question (solved)

Posted: Fri Nov 20, 2009 5:09 pm
by Spidey
I’m putting data into cells, down a column.

What I want to do is this…

If I enter the same data in any cell in that column, that’s already in another cell in that column, get a warning.

Example:

12345
34567
32459
65679
76456
12345.…this cell or next cell in row goes orange because this data is already in cell 1

Posted: Fri Nov 20, 2009 5:15 pm
by fliptw
goolge excel function duplicate column.

Posted: Fri Nov 20, 2009 5:47 pm
by ccb056
Sounds like you want a VBA macro that runs any time data is entered into excel.

The macro would create a long comma delimited string containing all the values in the column

The macro would then run an instr() function on the string using the current input as an argument

The return value of the function would then cause the current cell to change background color


Probably 5-6 lines of VBA.

Posted: Fri Nov 20, 2009 6:13 pm
by Spidey
It's the \"COUNTIF\" function...

Doh, if it were any more obvious, it would have bit me!

Thanks.