Have an excel question. I am looking to see if something states "complete" in one cell and if yes then look at a date in another cell and then count how many are within 30 day period of today's date. Below I know its wrong but might be able to get a better idea of what I am trying to do.
=sumifs(Main!B:B="Completed",Main!H:H,"<30")
You should be using COUNTIFS:
For 30 days window in the future:
=COUNTIFS(Main!B:B,"Completed",Main!I:I,">="&TODAY(),Main!I:I,"<"&TODAY()+30)
For 30 days window in the Past:
=COUNTIFS(Main!B:B,"Completed",Main!I:I,"<"&TODAY()+1,Main!I:I,">="&TODAY()-30)
=COUNTIFS(Main!B:B,"Completed",Main!H:H,"<="&TODAY(),Main!H:H,"<"&TODAY()+30)
Related
I would like to have a formula that will tell me if the time in a cell is between a range of time by returning a Yes or No value.
I used a code for one time, but am having a hard time expanding the formula for two times.
=IF(G2="","",IF(G2<(--"12:00 PM"),"Yes","No"))
The above code works
=IF(H2="","",IF(H2<(--"12:00 PM"),H2<(--"3:00PM")),"Yes","No"))
Any help is appreciated
Use AND():
=IF(H2="","",IF(AND(H2<(--"12:00 PM"),H2>(--"3:00 PM")),"Yes","No"))
You may try this way as well,
=IF(H2="","",IF(AND(H2<0.5,H2>0.625),"Yes","No"))
Where 0.5=12:00 PM
Where 0.625=3:00 PM
The problem that I'm facing currently is I have a start date and end date for multiple different items. What I want to do is be able to see when a report would be due at each given month that it's accounted for with a end report (+14 days from end date). For example:
The Lookup tab that I have for reference of the dates above to be able to match the months looks like this:
Now I'm having trouble creating a formula that would actually work with this. If I'm thinking correctly it would be something like,
IF Start Date != Start Month then IF Start Date is between March Dates, "Report", . . . IF End Date hits, add 14 days, then "End Report" on given month after 14 days.
So for the example above the outcome would look like the following:
This is the end result that I would want in the end. Due note that August for Battlefield 5 is supposed to be blank due to the game ending on 8/19/2018, +14 days for a end report: 9/2/2018 is the End Report date so their would not be a Report in August for that given scenario. (I think this is possible but not 100% sure for the August scenario)
I am open to any kind of formulas/Arrays/VBA's that would accomplish this task. I'm just having difficulty coming up with a solution for this that has been bugging me for a while, so any help is much appreciated!!
If anything needs to be further explained please let me know and I will do my best as an edit to this post.
-Maykid
Based on what you explained, you could just have a simple formula as such (no need for VBA):
LOCALISATION OF THIS FORMULA (E2) UNDER FEBRUARY 2018 in the picture attached
=IF(AND(MONTH($C2)=MONTH(E$1),MONTH($C2+14)=MONTH(F$1)),"",IF(AND(MONTH($C2+14)=MONTH(E$1),YEAR($C2+14)=YEAR(E$1)),"End Report",IF(AND($B2<E$1,($C2+14)>E$1),"Report","")))
And then you can drag this formula.
I hope it helps.
BR
Im creating an excel pay sheet so i can keep tabs on my pay.
I have two pay rates,
£9.30 is paid for hours worked from 6pm to 8am Monday to Thursday
£10.30 is paid for hours worked from 6pm Friday to 8am Monday.
I have a column that displays the pay rate, i want this to populate automatically with excel looking at the day of the week and then the start time and then returning the correct pay rate.
For example,
If the day is a Mon and the start time is 6pm return £9.30
If the day is Fri and the start time is 6pm return £10.30 etc etc
Any one have any ideas on how i can achieve this? Id rather this be formula based instead of VBA if possible but if it cant be formula based then VBA it is.
Thanks in advance
I had to make a few assumptions because your question was unclear about the possible start times for your shifts. Your wording and examples lead me to believe that your shifts always begin at 6 PM regardless of the day. I created a possible solution or start to a solution based on that assumption that does not rely on VBA. I've included links to an excel workbook with my solution and a screen shot. (I'm only allowed 2 links with my current rep.)
As Gowtham Shiva suggested in the comments, a screen shot of what you have so far would be helpful.
I created two tables and a named ranged called “valDays”. To use the workbook, you enter the date and start time for your shift in tblPay. Enter the pay rate for a specific day and time in tblRates. valDays provides a way to convert the text for a day of the week into a number for calculating date/time serial numbers.
Feel free to comment/message me for clarification. I’ll do my best to reply and refine the solution as necessary. I hope you find this answer helpful and appreciate feedback. This is my first time providing an answer on Stack Overflow.
I’m going to assume you know how to name a range, create tables, and rename tables in excel. If you don’t there are plenty of YouTubers and bloggers that cover these topics quite well.
List the days in a column off to the right. (I used column K.) “Sun”, “Mon”, “Tue”, etc. Select all the cells with the days of the week and name the range “valDays”.
Formula in tblRates[Serial]:
“=MATCH(tblRates[[#This Row],[Day]],valDays,0)+tblRates[[#This Row],[Time]]”
Formula in tblPay[Serial]:
“=WEEKDAY([Date])+[StartTime]”
Formula in tblPay[Rate]:
“=INDEX(tblRates[Rate],MATCH([Serial],tblRates[Serial],0))”
You can download the excel document and view these screenshots of a possible solution.
Link to Excel Workbook on Google Drive
Screenshot1
So I want to count how many entries have been filed in the month of July. Could someone help me how to do that so every month when the new data is added it automatically updates and gives new data for each month. I know I need to use combination of =CountIfs, =today, Month, =Year but not sure how exactly to formulate that.
Use SUMPRODUCT()
=SUMPRODUCT((YEAR($A$1:$A$100)=YEAR(TODAY()))*(MONTH($A$1:$A$100)=MONTH(TODAY())))
This will count every month that is the same as the month today.
Here is the COUNTIFS version for the original question
=COUNTIFS($A$1:$A$100,"<="&EOMONTH(TODAY(),0),$A$1:$A$100,">"&EOMONTH(TODAY(),-1))
or
=COUNTIFS($A$1:$A$100,"<"&DATE(YEAR(TODAY()),MONTH(TODAY())+1,1),$A$1:$A$100,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1))
You might be thinking of something like =countifs(month($A$1:$A$100),month(today)) but unfortunately it doesn't work - the first value in the countifs has to be a range and you can't use a function here so it has to be done with a SUMPRODUCT as in Scott Craner's answer.
I want to do quick calculations in Excel. I have a cell (A1) with 50:00:00. I do =A1+1 and get 74:00:00. So, I guess 1=24 hours=1 day. However, I try =A1+1:23:45 and get an error. Is there an easy way to add hours to hours in Excel? If not, do you have a better tool?
Please don't say something like =A1+1/24+23/24/60+45/24/60/60. That's not easy in my book.
Just use =A1+Time(1,23,45) for this.
You can use the Time function which takes as parameters, hour, minute, seconds, respectively.
So to ad 1 hour to the date in A1, you would type = A1 + Time(1,0,0)