Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare data in cells in excel 2

Status
Not open for further replies.

jazz007

Technical User
Jan 13, 2005
15
GB
Hi,
I have a difficult question. In sheet 1 in cell A1 if I type HELLO, and in sheet 2 cell A1 i type hello. How do I check in sheet 3 in cell A1 to see if what is in sheet 1(A1) and sheet 2 (A1) is the same or different. The problem is that it has to be case specific upper and lower case. If HELLO is typed in uppercase in sheet 1 then the answer in sheet 3 should be false because hello (in lowercase) is written in sheet 2. This needs to be done to mark data input tests and make sure people are typing the right format required ie Uppper of lower case. They are marked when the 2 sheets are exactly the same including the case of characters in it.

eg SHEET 1 CELL A1 = HELLO Answer sheet
SHEET 2 CELL A1 = hello employee sheet
SHEET 3 CELL A1 = some formula to match the case if its in different case and the spelling is correct still is wrong as it should have been in capitals.

Hope someone can help
 
Jazz

Use the formula =EXACT(A1,A2) it will return False unless the 2 cells are exactly the same.
 
Hi,

Can't be done with formulas, as you have discovered, but it can be accomplished via VBA code. Post your question in the forum707 Forum.

Skip,
[sub]
[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue][/sub]
 
Skip.

Now you've lost me as the Exact function compares 2 cells and returns false unless they are Exactly the same how can you say "Can't be done".

DH.
 
Seems to work as jazz007 requested to me. Skip, is there something that causes it not to work all the time that we are unaware of or were you just unaware of the function as I was?

I give a preliminary good job to dhulbert, contingent on what Skip might know.

coachdan32
 


[blush] DH is exactly correct.

Skip,
[sub]
[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue][/sub]
 
Thanks very much that was brilliant it works.

MAny thanks to all that contributed to helping me
 
Just to clarify, your 3rd sheet should have the formula:
=EXACT(Sheet1!A1,Sheet2!A1) to compare two sheets.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top