can't find function error

S

Susan

I am trying to calculate a delivery date based on an vessel departure date on
my worksheet (K512) and the location (N512), adding a specific number of day
for each location. My formula is below, and I continue to get a #VALUE! error.

IF(N512="AR",SUM(K512+25)),"",IF(N512="CA",SUM(K512+15)),"",IF(N512="FL",SUM(K512+33)),"",IF(N512="IL",SUM(K512+25)),"",IF(N512="PA",SUM(K512+31))))

I've spent 2 hours on this one formula - help please!
 
D

Don Guillett

If you want to use if try this idea. Better to use VLOOKUP table. Look in
help index.
=k12+if(n512="ar",25,if(n512="ca",15,if(n512="fl",33,0)))
 
T

Teethless mama

IF(N512="AR",SUM(K512+25),IF(N512="CA",SUM(K512+15),IF(N512="FL",SUM(K512+33),IF(N512="IL",SUM(K512+25),IF(N512="PA",SUM(K512+31),"")))))
 
T

T. Valko

Try this:

=IF(COUNTA(K512,N512)<2,"",K512+LOOKUP(N512,{"AR","CA","FL","IL","PA"},{25,15,33,25,31}))
 
D

David Biddulph

I'm surprised that you get a #VALUE! error. I would have expected Excel to
tell you that the syntax is wrong, as you don't have your parentheses
matched.

You could have made like easier for yourself by omitting the SUM() function.
You've calculated K512+25, so why did you put SUM(K512+25) instead of just
putting K512+25? You could equally have put AVERAGE(K512+25), MIN(K512+25),
PRODUCT(K212+25), MEDIAN(K512+25) or any of a number of other functions
which give you an output value equal to the input value if you give them one
argument, but they are all as pointless as using SUM() in this situation.

Have you looked at whether =K512+25 gives you a #VALUE! error? If it does,
my guess is that K512 contains not a date but text. What does =ISTEXT(K512)
return?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top