I have two ranges K1:NK1 are dates of the years (from 01/01/2015 to 12/31/2015), and K2:NK2 has text. In cell G2 I have the start date 01/01/2015 and I2 has the end date 04/01/2015.
I want to add a formula in cell F1, which check the start date and end date, whether there are any blanks between the two dates and give me the count.
I hope I have explained correctly.
Use =SUMPRODUCT((K2:NK2="")*(K1:NK1<=I2)*(K1:NK1>=G2)) if you want to include the start and end date, if you want to include them, use =SUMPRODUCT((K2:NK2="")*(K1:NK1<I2)*(K1:NK1>G2)).
Related
I am trying to set the entire first row as duplicate-paired dates
ex: Columns A & B: today's date; Columns C & D: tomorrow's date; Columns E & F:next date and so on until the end of the year.
I used conditional formatting and Autofill with Trend but no luck..
my question is about...how to actually do it without having to manually introduce them.
=IF(MOD(COLUMN();2)=0;CELL(A1)+1;CELL(A1))
Any advice would help, thank you
to populate the date in the first row, in cells A1 and B1 use:
=TODAY()
then, in cell C1 use:
=A1 + 1
And populate towards the right for as many columns as you need
Not sure I understand where the conditional formatting comes in...
Paired Dates
Today's date is 03/07/2019 which Excel 'translates' to 43531:
=43531+INT(COLUMN()/2)-MOD(COLUMN()-1,2)
or use any number for the 'starting point'. Format the cells as date of course.
Apply to Values
Rows
=INT(A1/2)-MOD(A1-1,2)+1
Columns
=INT(A1/2)-MOD(A1-1,2)+1
I need to find the sum of the cells in a Column if their end dates in another column occur in the current month.
I tried using the formula =sumif(L:L,MONTH(TODAY()),J:J) but it doesn't work.
Column L contains the full date (ex: 12/1/18).
Column J contains the values I want to add up.
So since it's December, I want to add all the values in J that have a date that is in December, and so on a so forth when I use the sheet in January.
Try this formula:
=SUM(IF(MONTH(L:L)=MONTH(TODAY()),J:J,0))
and enter it with Ctrl-Shift-Enter as it is an array formula.
Or use =SUMPRODUCT((J:J)*(MONTH(L:L)=MONTH(TODAY())))
Hello I am working with a formula that adds a range of cells after comparing dates. For example range A1:A5 has random dates within the year 2017, range B1:B5 each contain the number 10, cell C3 contains the word "OFF". Range A6:A371 begins with 1/1/17 and ends with 12/31/17. I would like a formula that adds the 10 onwards beginning on the date mentioned in A1:A5 but not if it says "OFF" from that date onwards. The formula I have to add them is
=SUMIF(A7,">="&$A$1,$B$1)+SUMIF(A7,">="&$A$2,$B$2)+SUMIF(A7,">="&$A$3,$B$3)+SUMIF(A7,">="&$A$4,$B$4)+SUMIF(A7,">="&$A$5,$B$5)
Is there a better formula and how can I have it not include the date that has "OFF" in column C? I hope I have explained the problem and goal well, if not please ask me to clarify further.
In B6 put:
=SUMIFS($B$1:$B$5,$A$1:$A$5,"<=" & A6,$C$1:$C$5,"<>OFF")
Then copy down the dataset
I'm trying to average a range of values if its associated date falls between two specified dates. The following function works:
AVERAGEIFS($1:$1,$2:$2,">=1/1/2014",$2:$2,"<=1/2/2014")
...in this case the values that you want to average are in row 1 and the dates that are associated with it are in row 2.
However, in this case I'm explicitly stating the date range in my formula (">=1/1/2014" and "<=1/2/2014"). Is there any way to create a similar formula that allows me to reference date cells to determine my date range instead of having to explicitly state the dates in the formula itself???
you can use the following, by putting the start date and the end date in another cell and refer to them in your formula:
=AVERAGEIFS($1:$1,$2:$2,">="&$B$4,$2:$2,"<="&$B$5)
with the following example:
Assuming your two dates are in E5 and F5 you could do it like this:
=AVERAGEIFS($1:$1,$2:$2,">="&E5,$2:$2,"<="&F5)
Given a date, ex. 05/05/2006, I need to name 12 columns starting with the month of the date given. I realize that I need to make a list of months, I just don't know how to loop it (ie. if one of the months in the middle is December, the next one needs to be January).
The only way I know, from other programming experience, is to make the first column equal to the first month, then make nested conditional statements for the other columns
IF(A1="Jan","Feb",IF(A1="Feb","Mar".......))
I'm sure that there's a better way to do it than brute force (plus, excel doesn't allow me to input that many nested conditionals).
This formula should do the trick:
=TEXT(DATE(2014,MONTH($A$1)+COLUMN()-2,1),"mmmm")
The starting date should be in A1 and first header in B column. If the first header is in another column, you should replace 2 in COLUMN()-2 with the column number.
In the first month column, use =TEXT(A1,"MMMM") where the date is in A1... In the subsequent columns, use =TEXT(EDATE(DATEVALUE("1 "&B1),1),"MMMM") to make a date from the month name, add a month and convert to text.
Assuming your date is in A1, and your columns are in B1 - M1:
Set B1 = A1.
Set C1 = EDATE(B1, 1). EDATE adds the specified number of months to the specified date.
Copy C1 to D1 - M1.
Now you have twelve columns containing the original date and the same date on eleven successive months.
Select B1 - M1; Format Cells; under Number, select Custom; and under Type, enter mmm. This will format these dates to just show the abbreviated month.
Assuming A1 has the date. The following should work
B1= A1 (format as "mmm")
C1 =EOMONTH(B1,1) (format as "mmm")
Copy the above formula and format from C1 for the other columns
Assuming the date is in A1
=TEXT(EDATE(A1,0),"MMMM")
The next column would be
=TEXT(EDATE(A1,1),"MMMM")
... and so on.