![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I am need of the "IF", however, instead of comparing "True" and "False", I need it to compare to cells and see if thier value is the same. Is this possible?
Thanks, Eric |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
|
Sure, but what do you want it to return? If they're both the same, then it's true, if not, then it's false.
But you could have it say Yes or No instead. Like this: =if(a1=b1,"Yes","No") or =if(a1<>b1,a1,b1*2) a sample if statement. |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
What I have is this. If Cell A and B are the same value, then cell C (with the formula in it) would be value X, if cell A and B are different values, then cell C would be X+10)
The Values of cell's A and B are derived from VLOOKUP statements. |
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
|
=if(a1=b1,X,X*10)
__________________
~Anne Troy |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 202
|
or =IF(EXACT(A1,B1),X,(X+10))
|
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
What's the difference between A1=B1 and Exact(A1,B1)?
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
EXACT is case-sensitive. If you have 'text' and 'Text' in cells A1 and B1 and in C1 you enter the formula (A1=B1), C1 will show True, if you enter EXACT(A1,B1), C1 will show False. It isn't needed in your case, if you're dealing with numbers, but it's a good tip for future use.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|