Copy Row if Date is Month Today & = - excel-formula

I want to copy the data from column A,D & E if the date in A is today's month & column E is less than 99.96
enter image description here

If you have the Filter function, you can do like this:
=FILTER(A2:E20;(MONTH(A2:A20)=MONTH(TODAY()))*(E2:E20<99,96);"nothing")

Related

Combine date range in column A row 3 though 9 and repeat every 7 rows

I have an excel sheet where I need to take an average cost of 7 days. I have two columns, one with a date and the other with a charge. See the attached screenshot for reference and output. The formula I'm using for charges works as expected in column d. I need to find a way to add the date range in column c. Please advise
Date: Need help here - Column c should repeat, and the next cell should have 2022-08-02 and 2022-14-02. The current formula starts on 2022-02-02 if I drag the cell.
Try below formula to google-sheet.
=INDEX(TEXT(A2+SEQUENCE(10,1,0,7),"yyyy-dd-mm") & " " & TEXT(A2+SEQUENCE(10,1,6,7),"yyyy-dd-mm"))
For Excel-365 no need INDEX().
=TEXT(A2+SEQUENCE(10,1,0,7),"yyyy-dd-mm") & " " & TEXT(A2+SEQUENCE(10,1,6,7),"yyyy-dd-mm")

Counting rows with start date before AND end date after in Excel

I have an excel sheet with an unique id column, start date column and end date column:
ID | start date | end date
I want to count the rows (or id's) with a start date BEFORE 01-01-2020 AND and end date which is AFTER 01-01-2020 OR empty.
All dates are in dd-mm-yyyy format.
I solved it in the following way:
Added two columns named 'Start Year' and 'End Year' with the following formula:
=IF(B1;YEAR(B1);"")
With the B column the start date column and for end year it references the end date
column of course. This returns the year and if the cell is empty it returns empty.
Then I used pivot tables. Not a direct solution but it works and it is not too complicated.

Sum with dynamic condition

I have an Excel file in which some columns. The Excel is my bank account.
The D column is date, and not just for one day,its the days of a week.
I want to some all columns in that has the same date, and insert it in new cell.ex : for a week i should have 7 sum.
Here is some possible data from the sheet.
date(Column D) Money(Column K) Sum of same date(Column N)
1396/1/1 2300
1396/1/1 1000 3300 // some of the same date
1396/1/2 1200
1396/1/2 320 1550 // some of the same date
It is possible with Excel functions? Does I need a subroutin?
In L2 try,
=IF(ROW()=MATCH(D2, D:D), SUMIFS(K:K, D:D, D2), TEXT(,))
Fill down.
Use this formula:
=IF(D2<>D3,SUMIF(D:D,D2,K:K),"")
Then copy down
Hey you need to work with Sumif or SUMIFS and your Formula should like,
SUMIFS(D2:D10, C2:C10,">="&TODAY()-7, C2:C10,"<="&TODAY())
Or it should be like,
=SUMIFS(D2:D10, C2:C10,">="&A2, C2:C10,"<="&A3)
Or
=SUMIF(D2:D10, C2:C10,">="&TODAY())
NB: Sum Range is D2:D10 & C2:C10 is Criteria range.
In 2nd example A2 & A3 Cells holds Date value.
Suppose your Dates are in Col A & you want to Sum values in Column B, so instead of Sumif you can use this,
C2=SUMPRODUCT(--(MONTH(A$2:A$10)=ROW()-1),--(B$2:B$10))
NB: MONTH function will pull the Month value from A2 and add with corresponding Cell value in B, drag the formula below.

how to get next non empty cell value in an excel column

Here is my excel looks
Column A Column B
1/1/2016
2/1/2016
3/1/2016
4/1/2016
5/1/2016
.
.
.
31/1/2016 1000
Now I will be referring one of the date in this month on another sheet and I would like to pull Column B value corresponding to last date on each month. There wont be any value till last date on column B.
Any hint to do this ?
First step is to make the condition:
=IF(A1=EOMONTH(A1,0),B1,"")
Note: if date in A1 is really the end of its month, it takes result from B1
Second step is to combine it with Vlookup. I assume that you would input some date in column C:
=IF(C1=EOMONTH(A1,0),VLOOKUP(C1,$A$1:$B$1000,2,FALSE),"")
Third step is... you can change the formula if your input is in another sheet. For the example: the data are in "sheet1" and the date input are in column C at "sheet2":
=IF(C1=EOMONTH(Sheet1!A1,0),VLOOKUP(C1,Sheet1!$A$1:$B$1000,2,FALSE),"")
Hope it'll help.

Formula's with year and weeknumber

I want to create a SUMIFS formula with a date criteria. The whole report is based on years and weeknumers and I like to keep it that way without converting these to dates. The data is set up as following:
Col A Col B Col C Col D
YEAR Weeknumber Turnover ColA & ColB
I want to create a MAT turnover number based on the report week and year. I tried to merge colums A & B to get YYYYWW but since the first 9 weeks are only one digit the formula does not work.
note Cel F1 contains the report year and Cel F2 contains the report week
The sumif formula is the folowing:
=SUMIFS(C:C;D:D;"<="&F1&F2;D:D;">="&(F1-1)&F2)
Anyone got any idea how I can make this work?
So your column D formula:
=--(A1&TEXT(B1,"00"))
Your other formula:
=SUMIFS(C:C,D:D,"<=" & --(F1 & TEXT(F2,"00")),D:D,">=" & --(F1-1 & TEXT(F2,"00")))
If you want to do it all with one formula then:
=SUM(IF(( --(F1 & TEXT(F2,"00"))>=--(A:A &TEXT(B:B,"00")))*( --(F1-1 & TEXT(F2,"00"))<=--(A:A &TEXT(B:B,"00"))),C:C))
This is an array formula and needs to be confirmed with Ctrl-Shift-Enter when leaving edit mode.
This is slow as it is written. It would be best if all the full column references were truncated to just the extreme absolute data limit. As in A:A to $A$1:$A$10000. This will speed up the array formula.

Resources