Compare value in current cell to previous cell

B

Bob Aloisi

Hello, I've got an Excel spreadsheet with a single column. The cells
contain a date & time (m/d/yyyy h:mm:ss). I'd like to compare the value in
cell A2 to A1, then A3 to A2, A4 to A3, etc. to determine if it's a
"duplicate" or "different".

Can you help?

THANK YOU
 
R

reitanospa1

You could do it with a formula in another column, but a simple
solution is to use conditional formatting:
Select cell A2
Select Format/Conditional Formatting...
Change condition to Formula
Type formula as =a1=a2
Change format (maybe using pattern and making it red would stand out
for you)
Use the format painter to add that formula to the rest of the values
 
B

Bob Aloisi

Hi Chip, thanks for your post. I reviewed your website and downloaded the
workbook but I did not find a solution to my problem, am I missing something?
 
D

Duke Carey

FYI - I'm not Chip

There is all kinds of information on Chip's site about dealing with duplicates
Since you appear to want a formula, put this in B2 and copy it down

=if(A1=A2,"Duplicate","Different")
 
B

Bob Aloisi

Perfect, thank you.

Duke Carey said:
FYI - I'm not Chip

There is all kinds of information on Chip's site about dealing with duplicates
Since you appear to want a formula, put this in B2 and copy it down

=if(A1=A2,"Duplicate","Different")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top