Help with formula: IF, variable, add time into a different cell

Closed
leoojeda Posts 5 Registration date Thursday 21 December 2017 Status Member Last seen 4 January 2018 - 21 Dec 2017 à 07:46
Mazzaropi Posts 1985 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 - 21 Dec 2017 à 12:38
Hello, I found this website after bumping my head with the keyboard trying to find a solution to a question I have.
I am trying to create a spreadsheet that will allow me to add a fix amount of time to a starting time. The whole process is to determine that if given a start time of day, and a duration of a process, what would be the end time of it.

This is what I could create so far, but I don't know how to add several variables on one formula. I was able to do it per variable on separate cells, but I'd like the formula to be on one cell altogether;

A1 is the original time, B1 will be a type of 3 equipment to choose from, C1 will be either 40, 45 or 55 minutes depending on type, depending on type of equipment on B1, then D1 will add C1 and A1 and throw a sum result of those to give me the end time.
I tried =IF(B1="319",+"0:40")*IF(B1="320",+"0:45")*IF(B1="321",+"0:55") And then D1=A1+C1 but all I get is zeros and no addition is made.

Any help pointing me on the right direction would be highly appreciate it.


Thanks!
Related:

2 responses

Mazzaropi Posts 1985 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
21 Dec 2017 à 09:16
leoojeda, Good afternoon.

Suppose:

A1 --> 10:00 (Cell formated as hh:mm)
B1 --> 319

Try to use:

D1 --> (Cell formated as hh:mm)

D1 --> =A1 + IF(B1=319,"0:40",IF(B1=320,"0:45",IF(B1=321,"0:55","")))*1

Please, tell us if it worked as you want.
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
leoojeda Posts 5 Registration date Thursday 21 December 2017 Status Member Last seen 4 January 2018
21 Dec 2017 à 12:26
Thank you Marcilio!

So I wont need to put anything on C1 right? this formula will add both times from A1 plus the different time depending on type directly on D1 cell, right?

How do I make the cells to show the time in minutes alone? I.E if the time is 20 over one hour, to count it as 80min?

Its finally going on the right direction, Thanks1
Mazzaropi Posts 1985 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
21 Dec 2017 à 12:38
leoojeda,

"So I wont need to put anything on C1 right?"
Right!

"this formula will add both times from A1 plus the different time depending on type directly on D1 cell, right?"
Exactly!

"How do I make the cells to show the time in minutes alone?
I.E if the time is 20 over one hour, to count it as 80min? "


Format cell D1 as [mm]

I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão