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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
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,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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