Excel Formula Question (solved)

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
User avatar
Spidey
DBB Grand Master
DBB Grand Master
Posts: 10808
Joined: Thu Jun 28, 2001 2:01 am
Location: Earth

Excel Formula Question (solved)

Post 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
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

goolge excel function duplicate column.
User avatar
ccb056
DBB Fleet Admiral
DBB Fleet Admiral
Posts: 2540
Joined: Wed Jul 31, 2002 2:01 am
Contact:

Post 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.
I haven't lost my mind, it's backed up on disk somewhere.
User avatar
Spidey
DBB Grand Master
DBB Grand Master
Posts: 10808
Joined: Thu Jun 28, 2001 2:01 am
Location: Earth

Post by Spidey »

It's the \"COUNTIF\" function...

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

Thanks.
Post Reply