Excel - Adding time due to specific value - excel

I need help creating a formula in Excel. I want the formula to look at the value in a cell. If the value is "telephone", I want it to add 5 minutes to my elapsed time. If the value is "email/Fax", I want it to add 2-1/2 minutes. Please help?

Say the elapsed time is in A1 and the text is in cell B1In cell C1 enter:
=IF(B1="telephone",A1+TIME(0,5,0),IF(B1="email/Fax",A1+TIME(0,2,30),A1))

Related

How do i make a cell in excel stop calculating?

I'm using wps spreadsheet which is similar to excel.
I'm trying to make a cell stop calculating at the end of the month, and keep the number of last day existing.
the existing code in k2 is:
=SUM(E2-I2)
For example: if on 01/31/2022 cell K2 says $2,000, then on 02/01/2022 it still says $2,000 but no longer grabs input from E2 and I2?
Thank you!
Let's say that the date the CELL K2 is updated is in Cell "MyDate", use this formula in K2. When the month doesn't match it stop.
=IF(MONTH(MyDate)=MONTH(NOW()),SUM(E2-I2),K2)
If needed you can also add the YEAR.

Compare times to a giving time in a cell

enter image description herei would like some help in trying to create a formula that compares a certain time in 1 cell to the Current time.in the end, i would like that cell to highlight a color if it is less then or equal to then the current time.
For example:
Cell A2 has a time of 14:00, highlight this cell Red if it is less then or equal too than the Current time.
You can just enter the formula =TEXT(NOW(),"H:MM") and then just do a conditional format as formula to say, cell C4<=A2 or what ever cell ref you have.
The NOW formula will return Todays date and the current time. The text formula allows you to remove the date, and display the time how you want it. "H:MM" will still return military time. If you want to go to standard use "H:MM AM/PM".
UPDATE: Try using the below format for the cell, and in the conditional formatting formula =($H$9<=(NOW()-TODAY()))
This should match up your formatting with the now function.
As for wanting to be able to just type in the time without having to hit the colon. The only way I know how to do that is cell format as Other and 00:00. However this is not a time format and it messes with the conditional formatting. So you will need to find a work around

If target cell time (formatted as hh:mm:ss) is within a range, active cell displays text

Active cell is B2. Reference cell is A2, formatted as hh:mm:ss
B2 will display specific text depending on what time is manually inputted in A2. Specifically:
If manually inputted text in B2 is between 12:07:00 - 12:06:00, A1 will display text "Z1".
If manually inputted text in B2 is between 12:05:59 - 12:05:30, A1 will display text "Z2".
If manually inputted text in B2 is between 12:05:29 - 12:05:00, A1 will display text "Z3". etc.
Preference is for an IF function, and not a VLOOKUP. Have tried with a VLOOKUP but I'm obviously doing something wrong:
Undesired result 1 for VLOOKUP attempt:
Undesired result 2 for VLOOKUP attempt:
Thank you!
As a start, I can give you following example, which returns "AAA" in case the time is larger than 12h05.00, and "BBB" in other case:
=IF(B1>=TIME(12;5;0);"AAA";"BBB")
Obviously, you'll need to be able to combine conditions, like:
=AND(B1>=TIME(12;5;0);B1<=TIME(12;6;0))
(which you'll need to embed in your formula)
From here, you have a good start.
In case you still have issues, you can comment this answer.
I know you wanted an if statement however I fixed your vlookup problem for this. You would list the times in ascending order and use the formula =vlookup(a2,$E:$F,2,True). Your column d values are not useful here. This will look up the closest match for A2 that doesn't pass the amount in E.
example

Distribute the value of a cell over multiple cells untill the remaining value is 0

I'm looking for a solution to automatically distribute the value of a cell (C3 till C10) based on the number of months (B7 till B10).
Anyone who can help me out with this formula?
First, you can make a helper row as showed in image attached starting with number 1.
Then apply below formula to cell(E5) and drag across the range.
Formula: "=IF($B5>=E$3,$C5/$B5,0)"
Related Image
Thanks
Abhinav
Type the following formula into cell E7:
= IF(COLUMN()-COLUMN($E7)+1<=$B7,$C7/$B7,0)
Then drag this cell over and then down as far as you need it.
For second part, to calculate amount of months you can add formula in cell("C4") as:
=MONTH(DATEVALUE(C3&"1"))-MONTH(C2)+1

Excel add one hour

I have in cel A1 with the following contents:
7:30:43
which is a time.
But now i want to use a formula to add one hour. What is the best way or how can i do this?
=A1+TIME(1,0,0)
Although, maybe this should be posted on Super User.
In cell A1, enter the time.
In cell B2, enter =A1+1/24
This may help you as well. This is a conditional statement that will fill the cell with a default date if it is empty but will subtract one hour if it is a valid date/time and put it into the cell.
=IF((Sheet1!C4)="",DATE(1999,1,1),Sheet1!C4-TIME(1,0,0))
You can also substitute TIME with DATE to add or subtract a date or time.

Resources