Another If Nesting Problem

kiki443

Board Regular
Joined
Feb 6, 2005
Messages
135
I have a few columns and I want the final column to do a calculation based on certain criteria.

Ex.:

col. 1 col. 2 col. 3 col.4
dog 4/20/06 5/20/06 =if(a2,dog,(today()-b2,if(a2,cat,(c2-b2,"")
cat 6/10/06 8/12/06
fish 6/30/06 7/15/06

I want the formulat in col. 4 to capture all available options.

Is this possible to do?

Thanks
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,432
Hi

If we take your example literally then you almost had it - it looks like a syntax issue. For example, is this what you want?

Code:
=IF(A2="dog",TODAY()-B2,IF(A2="cat",C2-B2,""))

If this isn't right, can you explain what you want to do?

Andrew
 

Forum statistics

Threads
1,141,143
Messages
5,704,537
Members
421,353
Latest member
jekoxien15

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