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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
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

Giggzz

Well-known Member
Joined
Jul 4, 2002
Messages
990
Thanks that did it.... looking at the code what is the =7? always wanting to learn ....
 
Upvote 0

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
ADVERTISEMENT
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

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,961
Office Version
  1. 365
Platform
  1. Windows
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,195,920
Messages
6,012,310
Members
441,690
Latest member
CyberWrek

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