Thread: Large formulas
View Single Post
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default Large formulas

I'd create another worksheet.

Put this in A1:Bxx

301 1.25
302 1.5
303 1.5
304 1.75
305 1.25
306 1.5
307 .75
308 .75

Then use a change to Peo's =vlookup() formula:

=if(b3="","",vlookup(b3,sheet2!a:b,2,false))



JimB wrote:

Thank you. What I am working on is a document we use at work to tally
production
and in this case there are 20 items. An example would be if item 301 were
completed, it would return a production value of 1.5. Here is the basic idea

=IF(B3=301,1.25,IF(B3=302,1.5,IF(B3=303,1.5,IF(B3= 304,1.75,IF(B3=305,1.25,IF(B3=306,1.5,IF(B3=307,0. 75,IF(B3=308,0.75,))))))))

"Peo Sjoblom" wrote:

It's possible to use IF function 20 times given that you concatenate each
part, however it is hard to audit and if you indeed need many conditions you
might be better off using something else like a lookup table or index,
here's an example of how to bypass the 7 nested limits

=IF( A1=1,"a","")&IF(A1=3,"c","")&IF(A1=5,"e","")&and so on

however you might as well use a vlookup formula

=VLOOKUP(A1,{1,"a";3,"c";5,"e"},2,0)


--
Regards,

Peo Sjoblom

(No private emails please)


"JimB" wrote in message
...
Do you know of any of creating formulas using the "if" function more than
seven times. It is normally limited to seven, I need as many as 20




--

Dave Peterson