Need help with IF formula

wislndixie

New Member
Joined
Feb 13, 2004
Messages
23
I've created a very simple spread sheet but I need help creating a IF formula that will calculate:
Cell J2 is a "y" or "n" value.
I want my formula to SUM f2:h2 if the value in J2 is y
I want my formula to SUM f2:g2 if the value in J2 is n

I tried this:
=if(J2=y,sum(f2:h2),sum(f2:g2))
I just get a zero in the cell that I type the formula.
I am using Excel 97.

thanks,
Wisln
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

wislndixie

New Member
Joined
Feb 13, 2004
Messages
23
Oh man, you guys are geniuses..thanks for the help. It worked perfect. I'm sure I'll be back with more questions..
Wisln
 
Upvote 0

Forum statistics

Threads
1,187,188
Messages
5,962,103
Members
438,585
Latest member
peterLEE0223

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