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
Related
In Cell F190 I have the following formula: ='[Account 19617768.xlsx]19617768'!$G$1142 (the cell displays the value in 19617768 $G$1142 - (£1609.50)
I can display this formula in Cell J190 with the formula: =FORMULATEXT(F190)
By manipulating FORMULATEXT(F190) (i.e. Using Left(FORMULATEXT(F190),38)&(Right(FORMULATEXT(F190),4)+2), I end up with Cell J190 displaying formula: ='[Account19617768.xlsx]19617768'!$G$1144.
What I need is for Cell J190 NOT to display the formula, but the actual value in Account19617768.xlsx G1144 (£1859.50), and it's the conversion of the formula into the value I don't seem to be able to find an appropriate function
I don't have a problem if I need to use an additional function in another cell to finish off the conversion?
I know this should be easy, but having just been released from hospital, I seem to be having
trouble working the simplest things out
'$' signs in excel formula keep the preceding data static.
In other words. Remove the $ in G$1065.
Now when you drag the formula down the column the Cell number will increase.
If you keep the $ in front of G the column G will never change no matter where the formula is copied.
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
I have a column of dates (daily) and I want an IF statement that will check if the corresponding cell is the 17th of any month.
I'm happy with the syntax of if statements but am unsure how I should be using wildcards here. 'x'below can be any numerical value.
The cell in question looks like - 17/07/2019.
= IF( cell = 17/**/****,x,0)
Excel gets confused and tries to show me how to do maths without a formula.
If you already know that the date is not a text value you can use a simple formula like:
=IF(DAY(A1)=17,”x”,0)
The only issue is that your dates may be genuine Excel dates or text values. With data in A1, in another cell enter:
=IF(ISNUMBER(A1),IF(DAY(A1)=17,"X",0),IF(LEFT(A1,2)="17","X",0))
I need to convert this data dd/mmm - 31.mar (March) to this format 31/03 - dd/mm using excel formula
A bit of googling would have solved your issue here.
Select cell (or range of cells).
Right click with mouse
Format Cells
Custom
Change Type: dd/mmm to dd/mm
=text([CellWithDate],"dd/mm")
is the formula you want, I think.
#Valeria:
Can't be sure I understood your problem and/or the type of solution you're looking for.
I assume you have a date in , say, cell A1 and that cell is showing the date in "dd-mmm" format.
I also assume you want that date to be shown in another cell (different from A1) in "dd/mm" format BUT without previously setting that target cell format to "dd/mm".
In case I'm right, the formula you should put in the target cell shouldo look like:
=DAY(A1) & IF(MONTH(A1)<10;"/0";"/") & MONTH((A1))
This way, if cell A1 holds "31-aug", you're getting "31/08" wherever you put that formula.
The value Excel actually stores in the cell is just its date+time serial number (whatever you're seeing is a very different question). DAY() and MONTH() do work on that value to generate day of the month and month of the year after that serial number.
Hope this helps.
My apologies if all the text in this document is in German, I'll try to explain it as well as possible.
Basically, this is just a sheet that contains the dates and times an employee was working. All the weekdays are automatically generated, e.g. when the month is set to October 2013, the weekdays automatically update. ("Di" -> "Tu"/tuesday, "Mi" -> "We"/wednesday, ...)
This works out alright, so I don't have any problems with that. What the actual goal is, I wanted to make it a little bit better readable by adding thicker lines after every sunday, signalizing the end of the week.
Using the conditional formatting, I've managed to do that for every line. E.g. for line 14, I used the formula =MOD(VALUE($B$14);7)=1 to determine, if the value in column B and line 14 is in fact a sunday. If the modulus of the weekday divided by 7 is 1, then it is a sunday and the formatting style is applied to those cells.
Now, this formula makes it a little hard to work with. I'd basically have to copy-paste the lines each time and change the line number for each line. I thought it would be possible to make it more dynamic by leaving out the $-symbol (=MOD(VALUE($B1);7)=1), but for some reason it didn't work for me.
What do I have to type in inside VALUE to reference the B-Column in the same line?
Okay, the issue was that you were applying your condition on a range on the wrong active cell.
An active cell is the only cell which is slightly less blue in the selected region; for instance, in the picture below, the active cell is A1:
And if this is the active cell, you will be able to use your formula:
=MOD(VALUE($B1);7)=1
There's a simpler formula though:
=WEEKDAY($B1)=1
This means that if the active cell was A32 or H32 in the picture, the formula wouldn't have worked, because the condition for formatting is being applied to the wrong cell!