In excel, I need to check if all of the below are true:
Column G says "Void"
Column J says "No"
The date in column E is after 4/9/2014
If all are true, I need to highlight the cell in column L
Formula:
=AND(FIND("Void",G2), FIND("No",J2),$E2>=DATEVALUE("4/10/2014"))
I also tried:
=AND(FIND("Void",G2), FIND("No",J2),$E2>=DATE(2014,4,10))
Applies to:
=$L$2:$L$5000
I can get the above to work without the date check. After I put that part in, it no longer highlights the cell but no error is shown.
What do I need to change?
Im not sure what I was doing wrong yesterday but I tried the same formula again today and now it works.
Related
I'm trying to create a spreadsheet that returns if an item was completed on time or not. "A" column is either "Open" or "Closed". If the "A" column is "Open" then I want to return a blank cell. If the "A" column is "Closed" then it needs to calculate dates in column "B" and "X" to see if it was on time or not. The first part of the formula is returning blanks as it should. The two "IF(AND" statements that follow seem to be causing all cells in column "A" that are "Closed" to return a "No". Been digging at this for two days trying different ways of writing a formula with no success. The "X" column is calculated by adding two columns together...not sure if that makes a difference.
=IF(A2="Open"," ",IF(AND(A2="Closed",X2>=B2),"Yes",IF(AND(A2="Closed",X2<B2),"No")))
I expect if A2="Open" then it would return a blank cell. This is working as expected.
I expect if A2="Closed" then X2>=B2 would return a "Yes" and if X2<B2 it would return a "No". There are no errors identified by Microsoft Excel.
If A2 can only be "Open" or "Close",
syntax of your If should be :
=IF(A2="Open"," ",IF(X2>=B2,"Yes","No"))
It may be that Excel is interpreting your dates as strings instead as dates. You can investigate by:
Open your formula in the editor and select B2.
While B2 is selected, hit the F9 key to show its value.
If it's a date value F9 will convert it to a number like 41609.
If it's a string you'll get "May 16, 2019".
Hit CTRL-Z to revert back to the original formula.
Repeat for X2.
Hope that helps
I'm having trouble using Conditional Formatting in Excel. No problem with setup for one row, but no luck replicating it to the rest of the worksheet.
A B C D
1 MATCH_RESULT CODE DESCRIPTION CHECKUP
2 #N/A A1 Chair #N/A
3 #N/A B1 Window #N/A
4 2 C1 Table #N/A
The goal is to identify if column A is filled with value #N/A (default error message for MATCH function). If it is, cells in columns - A, B, C - ONLY ON THE SAME ROW should be formatted (with color red). I.e. as per example, A2:C3 should be formatted.
This is working for me, however just for the first row and I fail to correctly replicate this downwards.
I'm selecting A2:C2 -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format.
I will end up with the formatting setup such as:
Formula: =$A$2=$D$2
Applies to: =$A$2:$C$2
A2 through C2 will be formatted, as expected (due to A2=D2). However I can't replicate the same thing on next rows. Format painter function will expand the current functionality so that still A2=D2 match is looked at for formatting other rows, instead of A3=D3 and so on.
Pretty sure the key is in $, but nothing has worked yet. Also pretty sure Excel allows just one cell in column D to be populated with value #N/A for comparison.
You have three issues, first your range is (part of) a single row =$A$2:$C$2. Try selecting ColumnsA:C before adding the rule, or change Applies to to:
=$A:$C
Second, you have anchored the row references in your formula. The 'style' should be:
=$A1=$D1
However your third issue is that comparing errors (#N/A resulting from a function) returns ... #N/A (so I don't know how you managed to get even a single row to work, since CF needs a TRUE result to trigger).
Maybe try:
=AND(ISNA($A1),ISNA($D1))
Replace the formula part with
=iserror($A2)
you may need to remove the $ manually.
I have a sheet that in Column M it has Date Visited and then I have put in a formula that then adds 6 months to the date which is displayed in Column N.
Then I have a hidden two columns that works out the date and and from that date it has been RAG assessed, Red Amber Green.
Column M is Date Visited
Column N is Next Visited
Column Q is the formula that tells you how many days over or under
Column R is where based on Column Q if it is G, A , R (Green, Amber or Red)
I have this formula which list all the dates and removes any blank cells in column N
=IFERROR(INDEX(Sheet2!$N$3:$N$78, SMALL(IF(LEN(Sheet2!$N$3:$N$78)=0,"", ROW(Sheet2!$N$3:$N$78)-MIN(ROW(Sheet2!$N$3:$N$78))+1), ROW(Sheet2!N2))),"")
What I want is when the below formula is true then the above to be triggered but only for cells that have R in Column R
=IF (CNI!R3="R",SHEET2!N3,"")
Hope this makes sense.
I don't mind using VBA if it is easier to achieve
Sorry, I'm a couple days behind on responding to you for this.
=IFERROR(INDEX(Sheet2!$N$3:$N$78, SMALL(_
IF(LEN(Sheet2!$N$3:$N$78)=0,"", ROW(Sheet2!$N$3:$N$78)-MIN(ROW(Sheet2!$N$3:$N$78)_
)+1), ROW(Sheet2!N2))),"")
But you want the this to happen if you have an additional criteria, this:
=IF (CNI!R3="R",SHEET2!N3,"")
You can have multiple criteria in your if statement using AND(). I am thinking that you could use the following, presuming you only want that specific If statement to apply (taken from the above, broken out If statement in the first coding section of my post):
IF(AND(CNI!R3="R",LEN(Sheet2!N$3:$N$78)=0),"", ROW(Sheet2!$N$3:$N$78)-MIN(ROW(Sheet2!$N$3:$N$78)
If your goal is to replace (from your second bit of code) the Sheet2!N3 (your true condition), then you would look at the following line, which includes both lines of your code:
=IF (CNI!R3="R",IFERROR(INDEX(Sheet2!$N$3:$N$78, SMALL(IF(LEN(Sheet2!$N$3:$N$78)=0,"", ROW(Sheet2!$N$3:$N$78)-MIN(ROW(Sheet2!$N$3:$N$78))+1), ROW(Sheet2!N2))),""),"")
Let me know if that helps clear up the issue!
I am trying to use the =COUNTIFS formula to track incoming post. Column B is the date of incoming post, Column E is the date the post is worked.
I want to count the number of rows where column B is less than today’s date and column E is blank.
I am using the formula below however it is giving me a return of 0 where it should be thousands.
=COUNTIFS(Invoices!B:B,"<Today()",Invoices!E:E,"")
Based on an answer I got here:
Excel: CountIf Quandry
I also tried formula below but again I am getting a 0 return.
=SUMPRODUCT(Invoices!B:B = "<Today()")*(Invoices!E:E="")
Finally I tried both formulae with much smaller ranges but again to no avail.
Appreciate any insights you may have
Thanks
The below formula will work, but you'll need to change the ranges to reflect your data set and maybe worksheet names.
The key to the below is combining the Today() function with the less than operator "<" by using an ampersand "&"
You also need to test column E for a blank value which is represented by blank quotation marks ""
=COUNTIFS(Invoices!B:B,"<"&TODAY(),Invoices!E:E,"")
You need to keep the TODAY() function outside of the quotation marks and concatenate it with the lesser than symbol. Try this:
=COUNTIFS(Invoices!B:B,"<"&TODAY(),Invoices!E:E,"")
I have a list of students who are between the ages of 3 and 5. lets say column A has the code, Column D has the childs age & Column F has their age group (3-5) If their age exceeds the age group then the Cell in column A will highlight Red. I am just not sure how to write this code correctly, all of the combinations i have tried come up with an error or just don't do anything.
IF(OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),0,7)="3-5" & (OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),0,4)>5 {THEN FILL CELL RED} {ELSE NO FILL}
In the first part of the statement you are checking whether the cell 7 columns across = "3-5". You don't need to use offset for this, you can just reference the cell 7 across directly.
So if you're applying the conditional formatting to A1 that part of the formula would just be =IF(H1="3-5",{then},{else}).
If you just want TRUE or FALSE as the answer you don't need the IF statement, so this shortens to: =H1="3-5",
If you're applying the conditional formatting to a range instead of just an individual cell, say A1:B10, then you write the formula for the cell in the top left of the that range. So for A1:B10 you would still you the same formulae as above.
For the second part of the statement, using the same logic as above, you get: =E1>5
To check both statements together you need to wrap them in the =AND() function, giving you this as the final formula for your conditional formatting:
=AND(H1="3-5",E1>5)
By using the AND function I can achieve the desired result without cell references moving if a cell is relocated.
=AND(OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),0,7)="3-5yo",OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),0,4)>5)