IF cell = X then enter result in another cell?

pennynikkel

New Member
Joined
Sep 3, 2003
Messages
41
Is there a way to enter in a formula that will look at one cell and then if it is true, will give the value of another cell.

B2 = Day, 3 = Tuesdays, B4 = Date, Sheet 1 B31 = Date to Match, then I want the result in another cell, Sheet 1 B29.

Trouble is that putting Sheet1B29 in "" marks, just gives me that text, and I want the date that is in that cell.

For example, if=IF(AND(B$2=3,B$4='Sheet 1'!$B$31),"???","")
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

AlohaJulio

Board Regular
Joined
Feb 10, 2004
Messages
188
You are so close. Don't put Sheet1B29 in quotation marks, try:
=IF(AND(B$2=3,B$4='Sheet 1'!$B$31),'Sheet 1'!$B$29,"") and don't forget to format the cell to show the date in the format you want.
 

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
Have you tried using that cell address without the quotes? Quotes denotes text, so the formula thought that was what you wanted.
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
pennynikkel said:
Is there a way to enter in a formula that will look at one cell and then if it is true, will give the value of another cell.

B2 = Day, 3 = Tuesdays, B4 = Date, Sheet 1 B31 = Date to Match, then I want the result in another cell, Sheet 1 B29.

Trouble is that putting Sheet1B29 in "" marks, just gives me that text, and I want the date that is in that cell.

For example, if=IF(AND(B$2=3,B$4='Sheet 1'!$B$31),"???","")

if i read you correctly...

=IF(AND(B$2=3,B$4='Sheet 1'!$B$31),Sheet1!$B$29,"")

is this what your looking for? you weren't all that descriptive.
 

pennynikkel

New Member
Joined
Sep 3, 2003
Messages
41
Thank you for both your help, it was just the "" marks, and I knew it would be simple, but just didn't get it!

Thank you again.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,215
Messages
5,594,883
Members
413,947
Latest member
gizmolucy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top