If equation with three possible outputs - excel-2010

I've looked for this solution, but it currently eludes me:- Cell AG15 is the output message cell. If there is a date in A15, I want it to read "Loaded", If there is a date in cells A15 AND M15, I want it to read "Work in Progress", If there is a date in cells A15, M15 AND N15, I want it to read "Waiting Quote"....I seem to have hit a blind spot - I'm sure it's simple Grrrrr

I guess you can start with:
=IF(A15<>"",IF(M15<>"",IF(N15<>"","Waiting Quote","Work in Progress"),"Loaded"),"")
Assuming that those cells are empties or contain valid dates (valid for your task, es. M15 < N15). If you have to check if a data is actually a date, you can use the VBA function IsDate().

Or if you want to work the other way back i.e. as long as there is a date in N15 you don't need dates in the other two to get "Awaiting quote"
=IF(N15="",IF(M15=,"",IF(A15="","","Loaded"),"Work In Progress"),"Awaiting Quote")

Related

How to generate sequences in Google Sheets

I'l like to create a sequence of dates using "sequence formula" with a start and end date. I mean, something like this:
start date = 2020-01-01
end date = 2022-12-01
I just also want to bring the first day of the month, like the following example:
2020-01-01
2020-02-01
2020-03-01
......
2022-10-01
2022-11-01
2022-12-01
How can I get this? Is there another way to do it?
Thanks!!!
There are several ways to approach this. Here is one I recommend:
=ArrayFormula(DATE(2020,SEQUENCE(DATEDIF("2020-01-01", "2022-12-01", "m")+1),1))
You'll replace the first 2020 with the year of your starting date and the next two string-dates with your full start and end date. That's it.
Just make sure you leave enough cells open below this formula to accommodate the number of dates you're requiring the formula to output.
Format the output range in the date format you prefer (Format > Number...).
Simple SEQUENCE() should work. Try-
=SEQUENCE((B1-A1)+1,1,A1)

Google Sheets. Automatically change given date plus n days

Good afternoon. I have 2 cells for 2 dates with date format on them and formula =DATE(2022; 1; 19). One cell is a first day of a current week period. Another cell is first day of a next week (=B17+7). I want to make both those cells to automatically change +7 days every week after i enter for example the first current date.
You can use for the first day (monday)
=today()-WEEKDAY(today(),2)+1
One way of solving your need while escaping circular dependency error is to do the following:
Keep cell B17 as is (=B13+7), however, instead of putting a date in cell B13, just put the following formula :
=TODAY()-WEEKDAY(TODAY(),2)+1
The result would be that the 2 cells will always update to the correct dates every time you'd open the spreadsheet.

Match date in two cells with conditional formatting, +/- 3 days.. Google sheets

I am making a deadline sheet for office.
I have made a conditional format that compares the dates with our "office are closed"-dates provided by our HR-department. If the delivery date match any of the "office closed"-dates in the next column it will be coloured red.
This works fine, but I just noticed one thing. If the date where 1 day before the holidays, and the holidays would be many days a row starting next day, we wouldn't see that and we would probably get big trouble manage Finnish these masters before deadline as we are not at office for a few days.
So, I thought, maybe I could add to the script something that says: "compare the dates in this column with the dates in "Office Closed"-column, if there is a match within a range of 5 days, color it red...?
Is this something I can do?
here is a screenshot of the sheet.
This is the code I use in Conditional Formatting now:
=COUNTIF($L$4:$L$25,H6)>0 which works fine.
Thanks for any help!
/Andreas
Use following formula in CF:
=IF(LEN(A2),SUMPRODUCT((($C$2:$C+3)>=A2)*(($C$2:$C-3)<=A2)))

I need to define a custom work week in MS access

I am trying to create a custom function on a form to define a week Number.
I have created a table that defines the week number.
Example WeekNo, StartDay, End Day
example: WeekNo 1 StartDay = 3/29/2020, End Day 4/4/2020
I have a Date box on my form if I enter a date of 3/29/2020
I would like 1 to be populated in my week number box.
On my form in the row source I have designed a Dlookup query
=DLookup("[WeekNumber]", "tblWeekNumber", "[Startdate] >= " & frmSearchNew.dt_Date & "") & [EndDate] <= frmSearchNew.dtDate
When I change to from view I get the error the record source specified on this form does not exist.
The table tblWeekNumber has the fields ID, WeekNo, StartDay and EndDay.
Where am I going wrong? any help is appreciated.
There are quite a few issues with the DLookup that you have put together.
Firstly, the field that you are looking for and the fields that you are using as criteria do not appear to match those in the table - WeekNumber/WeekNo, StartDate/StartDay, EndDate/EndDay;
Next, the logic for the lookup is wrong. You are trying to find a the week number that has a start date that is greater than the entered date, and an end date that is less than the entered date. What you should be looking for is a start date before the entered date, and an end date after the entered date.
Finally, dates are a bit funny in Access. You need to wrap them in '#' so that Access knows they are dates, and you should also take care to disambiguate them - 03/04/2020 could be either 3rd April or 4th March depending on you nationality.
Putting it all together, the final control source should look like:
=DLookUp("WeekNo","tblWeekNumber","StartDay<=#" & Format([dt_Date],"dd-mmm-yyyy") & "# AND EndDay>=#" & Format([dt_Date],"dd-mmm-yy") & "#")
Regards,

SUM gives me a date instead of a number in Google Sheets

I am writing a few simple formulas for Google Sheets and I've been stuck on this for a little while now. I am trying to get a quick overlook of how many people got added to a sheet in the past week, counting from Saturday, but unfortunately, it's not working.
I have this piece of code to set the date since last Saturday.
=TODAY()-WEEKDAY(TODAY())
This works just fine. The output gives the date as 3/7/2020.
I then have a different row which checks if the recruitment date, which is stated somewhere differently, is bigger or equal to past Saturday. It checks it like this:
=IF(I2>=K2, "1", "0")
This gives an output of either 1 or 0 (1 if it was on Saturday or after Saturday, 0 if not).
Then I went to the main page, where I want to put the SUM. I put the following code:
=SUM('Control Center'!J2:J)
It should just add the 1's that are said earlier, but instead, it gives me the following date: 12/30/1899.
Does anybody know what went wrong? If you need any clarification, feel free to ask.
go to 123 menu and select Automatic or Number:
Take the quotation marks off the 1 and 0 so:
=IF(I2>=K2, 1, 0)

Resources