Outcomes to asses if NCW-reports are finished in time or not column E contains either a date or not, if a date is entered the report is finished. column F contains the target date, by which date the report should be finished.
I am trying to formulate a formula that tests 3 cells with 4 possible outcomes.
NCW Open
Closed Overdue
Closed in time
Closed Overdue
I have got a data-set where =TODAY() is set in cell B1 and my data set date in column E (is either blank of contains a close date) and F (contains the target date).
The formula needs to check if cell in column E is blank if blank then check target date against =TODAY() in B2. Is =TODAY() before or after the date in F
If a date is in a cell in column E, disregard B1, but check if the date in E is before or after the target date in F.
Currently I came up with the following formula, but does not work it only returns NCW Open and Closed Overdue
=IF(AND(ISBLANK(E3)=TRUE,E3>=$B$1),"Open Overdue", IF(AND(ISBLANK(E3)=TRUE,E3<=$B$1),"NCW Open", IF(AND(ISBLANK(E3)=FALSE,F3>=E3,),"Closed in Time","Closed Overdue")))
Left table: Current outcome with the formula. Right table: Desired outcome
To simplify the formula, you can use 1 nested IF() only in each condition. See formula for cell G3:
=IF(MIN(TODAY(),E3)>F3,IF(ISBLANK(E3),"Open Overdue","Closed Overdue"),IF(ISBLANK(E3),"NCW Open","Closed in time"))
The formula first checks if the item is overdue or not, and in the second if for each result if it's open or closed. See the results:
Related
I've been trying to come up with a formula to sum a specific amount.
It has 3 criterias: 1st is an account number: column A; 2nd is a Cost Center number: column C; and 3rd is a date from line i1 to T1 (eg.:i1= jan/2020; t1=dez/2020).
The dates are formated with "date" type: mar/12 on both sheets.
The date on the formula refers to a specific cell $F$2 in order for me to just comeback there, type the month that i want and it automatically calculates the values while taking into account the other criterias.
This is the formula i adapted from some research.
=SUMPRODUCT(Sheet2!$A:$A=Sheet1!$C20)*(Sheet2!$C:$C=Sheet1!$H3)*(Sheet2!$I$1:$T$1=Sheet1!$F2)*(Sheet2!$I$2:$T$635)
This formula currently gives back 0 instead of the value pretended (which is ~631)
Here are 2 prntscreens as form of sample, i hope it helps.
Sheet1 with formula
Sheet2
Thank you.
I have a spreadsheet that records a timeline of information for different documents, specifically: when I send it, when I respond to it and when I need to finalise it.
In column J, I input the date I have sent the document given as a short date.
Column K, then automatically adds 15 days to J - giving me my response date.
=IF(J4<>"",SUM(J4+15),"")
Column L is my final date for when I've finished with the document.
What I'm struggling to create, is a conditional formatting formula for column K that reads the cells in column J - adds 15 days and highlights all the dates beyond the 15 days; that part is pretty simple. However, I would also like it to read the cells (in the same row) under column L - and if that cell is not blank/it has a date, then do not highlight column K. Meaning if I have finished with that document, I don't want it to run a formula to remind me to follow it up!
Below is a visual example:
So in the cell J3 reads the 27th November, add 15 days brings us to the 12th December which is before today's date (the 15th) and because there's nothing in L3 - I would like it to mark K3 as red.
Alternatively, in J4 is the 28th November, therefore it's the 13th December in K4 - however, because there's a date in L4 I do not want it to flag K4 in red.
Thank you, I appreciate the help!!
In order to highlight the values in column K if the date is passed and if column L contains a blank, you can use the following formula for your conditional formatting:
=AND(K3<TODAY(),ISBLANK(L3))
If you already have a formula for your conditional formatting, simply replace it. If not, you add the formula the following way:
Select K3 to K8
Home > Styles > Conditional formatting > New Rule > Use a formula to determine which cells to format.
Type in the formula above. It will automatically apply to the selected range.
Be aware that TODAY() is a volatile function which might slow down your workbook if you use it extensively.
Suppose the value of cell A1 is total sales $ at the Los Angeles location, year to date. The value is pulled from a pivot table on a different sheet.
The formula for A1 is:
=SUM(GETPIVOTDATA("Amount",'Transactions(Pivot)'!$A$75,"Location","Los Angeles","Months",{7,8,9,10,11,12}))
Currently, every month when I run this report I need to manually update the month arrays in the formulas; for example next month I will need to manually update {7,8,9,10,11,12} to {7,8,9,10,11,12,1}. There are many cells and this is a very tedious task.
My question is how can I automate the task of updating the month array in the GETPIVOTTABLE formula?
What I've attempted with no success: I set up a 2-column lookup table on a different sheet where column A is the current month and column B contains the month array value to be used in the GETPIVOTTABLE formula. For example:
7 {7}
8 {7,8}
9 {7,8,9}
etc...
Then I tried updating my GETPIVOTTABLE formula to use a VLOOKUP to get the month array:
=SUM(GETPIVOTDATA("Amount",'Transactions(Pivot)'!$A$75,"Location","Los Angeles","Months",VLOOKUP($B$2,$L$9:$M$20,2,FALSE))
But it didn't work - I get a #REF! error.
Thanks in advance for your help.
You can give a range instead of the vlookup and enter the numbers 7,8,9 . . . . in that range for example your formula
=SUM(GETPIVOTDATA("Amount",'Transactions(Pivot)'!$A$75,"Location","Los Angeles","Months",{7,8,9,10,11,12}))
will become
=SUM(GETPIVOTDATA("Amount",'Transactions(Pivot)'!$A$75,"Location","Los Angeles","Months",A1:A7))
and A1 to A7 contains the months.
after entering this formula press Ctrl+Shift+Enter
I have some data which includes a list of tasks for 2 individuals.
I want to represent this data in the following format.
So that it looks like the below.
How can I achieve this with the use of formulas?
[EDIT]
I don't think this question is the same as 'Data Wrangling in Excel - Rearranging Columns and Rows' as mine is about reflecting schedules in a more gantt chart-esque like format, whereas the other question seems to be more about transposing data.
Not sure if you have your desired output on the same sheet or a new sheet, but I used a new sheet starting in cell A1. The source datasheet is referred to as S1 in the formulas.
Assumptions:
Column C = Date Start
Column D = Date End
Persons' entries are grouped together (Person1, Person1, then Person2; never Person1, Person2, Person1)
Person can't be assigned two different areas for the same timeframe (e.g., Person1 can't have A and B for a given month)
Your desired dates are always the first of the month
Output/Formulas:
A1 is blank
A2: =INDEX('S1'!$A$1:$A$6,IFERROR(MATCH(A1,'S1'!$A$1:$A$6,0),1)+COUNTIF('S1'!$A$1:$A$6,A1))
A3: Formula copied down from A2
B1: =IF(A1<>"",EDATE(A1,1),MIN('S1'!$C$1:$D$6))
C1 to J1: Formula copied from B1
B2: =INDEX('S1'!$B$1:$B$6,MATCH(1,INDEX(('S1'!$A$1:$A$6=$A2)*('S1'!$C$1:$C$6<=B$1)*('S1'!$D$1:$D$6>=B$1),0),0))
B3 and C2 to J3: Formula copied from B2
Explanations:
The A2 formula: Looks at where the previous Person entry first occurs (MATCH part), and counts how many entries it has (COUNTIF part) to determine the next Person entry in line (INDEX part). The IFERROR portion is used to return the first Person entry, which is assumed to be on row 1.
The B1 formula: Adds one month to the previous date heading (EDATE part). The very first date heading looks for the earliest date in your source data (MIN part).
The B2 formula: Uses a match with multiple criteria on your source data (Person entry must match the indicated person, start date must be before or on the date heading, and end date must be after or on the date heading). The second INDEX creates an array of the combined criteria results (1 if true, 0 if false), and the MATCH returns which entry that is. The first INDEX returns the task (A, B, or C).
I'm building a yearly shift roster and I'm trying to figure out how to apply the conditional formatting to show where the weekends are. Figuring out how to define the weekend is easy, the problem here is getting the conditional formatting to cooperate with that rule.
Here's how I have my table set up for anyone trying to replicate this:
Row 1 - =LEFT(TEXT(row 2,"aaa"),1) this displays the single letter day of the week based on the date in row 2
Row 2 - The date, formatted to DD. A2 starts with 1/1/2016, B2 is =A2+1 and that is repeated all the way to column NB (=NA+1)
The conditional formatting formula I'm using is =WEEKDAY($A$2,2)>5, applied to $A$1:$A$15. Now this works great for column A, but when trying to copy it over to column B the rule is still referencing column A (however it will apply it to column B). What I'm struggling to figure out is how to get the conditional formatting rule to look at all 365 columns and then apply the conditional formatting to that single column and not the entire range. The end result here would be that the weekdays have no fill applied while the weekends are shaded.
The solution to this is to use =WEEKDAY(INDIRECT(ADDRESS(2,COLUMN())),2)>5.
Here's what's going on in each part, starting inside and working out:
COLUMN() returns the column number of the current cell (A=1, B=2, C=3, etc...), so for the sake of this example let's say you had cell A2 selected, COLUMN() will then return 1.
ADDRESS(2,1) returns a TEXT string of the absolute cell reference ("$A$2"), in this case locked to row 2.
INDIRECT("$A$2") converts the text string into the A2 cell reference.
WEEKDAY($A$2,2) evaluates the date in cell A2 (1/1/2016) and returns a numerical value based on what date of the week it is. The 2 argument sets the week as Monday (1) through Sunday (7). In this example WEEKDAY() will return a value of 5 (Friday).