# IF cell = X then enter result in another cell?

#### pennynikkel

##### New Member
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),"???","")

### Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

#### AlohaJulio

##### Board Regular
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
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
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(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
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.

Replies
4
Views
112
Replies
1
Views
76
Replies
1
Views
50
Replies
5
Views
96
Replies
3
Views
197

1,171,186
Messages
5,874,238
Members
433,040
Latest member
techmichelle

### 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.

### Which adblocker are you using?

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

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