IF statement help

Giggzz

Well-known Member
Joined
Jul 4, 2002
Messages
990
=IF(L5:L11="TRAINING",12,SUM(J15/L15)) is giving me #value error when the statement is true. Any idea why? Thanks
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Yes, it will fail, because you are trying to pass a linear array into a single value syntax. Why not try using something like this ..


=IF(COUNTIF(L5:L11,"Training")=7,12,J15/L15)


HTH
 
Upvote 0
Thanks that did it.... looking at the code what is the =7? always wanting to learn ....
 
Upvote 0
So, nstead of 7, you could use ... =ROWS(L5:L11);

and if L5:L11 had been assigned a range name yRange ... you could use =ROWS(yRamge)
 
Upvote 0
Did you want it to be true if any cell in L5:L11 is TRAINING ?

If so, perhaps:

=IF(COUNTIF(L5:L11,"Training"),12,J15/L15)
 
Upvote 0

Forum statistics

Threads
1,215,008
Messages
6,122,672
Members
449,091
Latest member
peppernaut

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
Back
Top