PDA

View Full Version : Multiple If True Values - IF Function Excel



hue
2011-06-24, 02:53 AM
Not an expert so I need allot of help. In a production schedule I have various models to make with X number of units per model in a day. Using VLOOKUP I have a time value (production time) column for each model multiplied by its number of units, so I know the time it takes to produce each individual model in a day. I now need to include a PST (Production Standard Time) column for each model so workers can know at what time they should finish each of the models in the daily schedule. During our work hours (7:00am - 5:06pm) I have 3 lunch/rest breaks one @ 9:20 am(lasts 19min), 12:30 pm(lasts 29min) and 3:00 pm(lasts 9min) so I need to add to the PST that specific lunch/rest time if a model is finished during any of the lunch/rest periods, so Iíll assure the PST is accurate. How can achieve this using one single formula, considering the 3 criteria?

Criteria #1: IF((A1+B1)>=timevalue("9:20 am") but <=timevalue("12:30 pm"), (A1+B1)+time(0,19,0), (A1+B1))
Criteria #2: IF((A1+B1)>=timevalue("12:30 pm") but <=timevalue("3:00 pm"), (A1+B1)+time(0,29,0), (A1+B1))
Criteria #3: IF((A1+B1)>=timevalue("3:00 pm"), (A1+B1)+time(0,9,0), (A1+B1))

Since the values will be adding up as the day goes, it can occur, that the value (A1+B1) falls directly into the second criteria (eg. 1:37 pm), I need then for it to add the 29 minutes plus the 19 of the first criteria, and so on and so forth. Thanks so much in advance.

Ken Puls
2011-06-24, 07:49 AM
Hi there, and welcome to the forum. :)

I've set this up so that you can actually change the shifts easily (the green cells in the first table), as well as put in the times required and quantities in the second table. Hopefully I followed what you were after.

hue
2011-06-30, 11:03 AM
Dear Ken,

I appreciate your time and efforts to help in this issue. I am still having problems with your solution offer, so lease review the image below to see if I can explain myself:

<table style="width:auto;"><tr><td><a href="https://picasaweb.google.com/lh/photo/u8JKVbDRzZHM9YIpigTms8tZ5bgznTIVX44CV8BiFqM?feat=embedwebsite"><img src="https://lh4.googleusercontent.com/-m-UzQXd2448/Tgw7ggGla4I/AAAAAAAAAHQ/_kygoMClFBI/s144/Multiple%252520If%252520True%252520Values%252520-%252520IF%252520Function%252520Excel%252520-%252520Example%2525201.jpg" height="66" width="144" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="https://picasaweb.google.com/hescamillavideos/Escritorio?authkey=Gv1sRgCPWfp4vipNO3hwE&feat=embedwebsite">Multiple If True Values - IF Function Excel</a></td></tr></table>

Thank you. hue

Ken Puls
2011-06-30, 10:42 PM
Hi Hue,

I'll try and take a closer look at this this weekend.