I am trying to do something with the days of the week. I have a cell on Sheet1 called 'Yr Overview' where a user inputs the day of the week.
On a second page I am reference thing by using =left('Yr Overview'!A1,1) so that is a user inputs a day like Sunday, if just shows it as an S. I have it working up to this point. Now I am trying to make that cell effect others on the same sheet.
So that is A1 = S A2 = M (S + 1 day) A3 = T (M + 1 day) etc.. I seem to be unable to do this, so I am just asking if this is possible? Or would I need to use VBA to achieve this.
Try this in A2 and copy down:
=INDEX({"MON","TUE","WED","THU","FRI","SAT","SUN"},MATCH(UPPER(LEFT(A1,3)),{"SUN","MON","TUE","WED","THU","FRI","SAT"},0))
Try this out. Enter this formula in cell A1 and drag to the right.
=LEFT(TEXT(MATCH('Yr Overview'!$A$1,{"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"},0)+COLUMN()-1,"dddd"))
Below solution helps only if in case of input date instead of day.
A1- 07/14/2017
A2=TEXT(A1+1,"dddd")
A3=TEXT(A1+2,"dddd")
A4=TEXT(A1+3,"dddd")
A5=TEXT(A1+4,"dddd")
A6=TEXT(A1+5,"dddd")
A7=TEXT(A1+6,"dddd")
In A2 add this formula:
=IF(ROW()<8,IF(FIND(LOWER(LEFT(Sheet1!$A$1,3)),"montuewedthufrisatsun",1)+(ROW()-1)*3<=LEN("montuewedthufrisatsun"),UPPER(LEFT(MID("montuewedthufrisatsun",FIND(LOWER(LEFT(Sheet1!$A$1,3)),"montuewedthufrisatsun",1)+(ROW()-1)*3,3),1)),UPPER(LEFT(MID("montuewedthufrisatsun",FIND(LOWER(LEFT(Sheet1!$A$1,3)),"montuewedthufrisatsun",1)-(ROW()*-3+24),3),1))),OFFSET(A2,-7,0))
Assumes day is input in cell A1 on Yr Overview
Related
I am having trouble writing a formula in Google sheets that will return the previous quarter based on today's date.
For example, if I have cell A1 as =today() which is 1/26/22, I would like cell B1 to return the previous quarter "Q4 2021".
Thanks in advance!
I didn't hear back from you on my comment to your original post. But assuming that you are, in fact, using Google Sheets and that you are actually only needing the return for one cell (A1), this should work in B1:
=VLOOKUP(MONTH(A1),{1,"Q4";4,"Q1";7,"Q2";10,"Q3"},2,TRUE)&" "&YEAR(A1)-IF(MONTH(A1)<4,1,0)
If you were trying to get such a return for an entire columnar range (say, A2:A with a heading in A1), you could use this version in B1:
=ArrayFormula({"Prev. Quarter"; IF(A2:A="",,VLOOKUP(MONTH(A2:A),{1,"Q4";4,"Q1";7,"Q2";10,"Q3"},2,TRUE)&" "&YEAR(A2:A)-IF(MONTH(A2:A)<4,1,0))})
Here you go... just copy and paste this formula in B1:
=IFS(
A1="","",
AND(MONTH(A1)>=1,MONTH(A1)<=3),"Q4 "&YEAR(A1)-1,
AND(MONTH(A1)>=4,MONTH(A1)<=6),"Q1 "&YEAR(A1),
AND(MONTH(A1)>=7,MONTH(A1)<=9),"Q2 "&YEAR(A1),
AND(MONTH(A1)>=10,MONTH(A1)<=12),"Q3 "&YEAR(A1)
)
I have a Date. Ex: 1/1/2017.
I have a week number. Ex: WEEKNUM(1/1/2017) = 1.
How can I list all 7 days, starting from Monday - Ending on Sunday.
Thanks
The way to do it is like this:
=Text(A1,"dddd")
Or if I understood you correctly, something like this may do the job:
=(A1*7)+Date(2017,1,1) to give you the first day in the a1 week.
You may add +1 at the end of the formula.
In general, some interesting formulas here:
http://www.mrexcel.com/archive/Dates/29795.html
Edit:
Try this :
=DATE(Yr,1,1+(Nth-(Dow>=WEEKDAY(DATE(Yr,1,1))))*7)+
Dow-WEEKDAY(DATE(Yr,1,1))
Taken from here:
http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear
With week numbers in Row1 (1 in A1) then in A2 copied down to A8 and A2:A8 across to suit:
=DATEVALUE("1/1/17")+7*(A$1-1)+ROW()-1
I have this spreadsheet to track how long a team is taking to complete customer requests. I've coded the net days considering holidays and work week for different team members but when 'L2' is blank (case completed date) my formula is returning odd values such as '30520'
I want to tell excel that is L2 is blank, then ignore my formula and leave the cell blank, else display the calculated value. I am also okay with displaying OPEN if L2 is found empty. This is what my formula looks like:
=IF(OR(B2="Jack", B2="Jill"),NETWORKDAYS.INTL(K2,L2,1,O$2:O$11),
NETWORKDAYS.INTL(K2,L2,7,Q$2:Q$26))
Where:
B2 = case owner
K2= case received date
L2 = case completed date
O = set of US holidays
Q = set of intl’ holidays
Thanks!
I want to tell excel that is L2 is blank, then ignore my formula and leave the cell blank
Well, that's easy enough to do with just any formula: Wrap another IF statement around the formula
=if(L2="","",<theFormula>)
I got the answer to this in a different forum. I used the following:
=IF(L2="","OPEN",IF(OR(B2="Jack", B2="Jill"),NETWORKDAYS.INTL(K2,L2,1,O$2:O$11),NETWORKDAYS.INTL(K2,L2,7,Q$2:Q$26)))
Also, I formatted my target cell as "general" and it worked wonders!
I've simulated my problem.. because my original plan is complex to describe:
I need C4 to be 8 because A2 = A3 = A4, and 5 + 2 + 1 results in 8.
Using this logic, the expected results should be:
C4:8 C6:10 C10:23 C12:23
Well, my problem:
I can't use sumif due after the last day of the month (28, 29, 30 or 31) the next day will be 1 again.
I'm stucked on that. Any help would be appreciated.
Thank you for your time.
If it needs to be in the same table I'd go with:
=IF(C2<>C1,SUMIFS([Number],[Day],[#Day],[Month],[#Month]),"")
Where column C contains the days. This way only the first row will show the sums.
Or you could use an extra table containing Year, Month and day and use:
=SUMIFS([Number],[Day],[#Day],[Month],[#Month])
to collect your data and have it aggregated into one table for further use.
In C2 enter:
=IF(A2=A3,"",SUM($B$2:B2)-SUM($C$1:C1))
and copy down
EDIT#1:
The first part of the IF insures blanks where they are needed. The second part of the IF adds up all of column B, but removes parts of B that already appear in column C
Maybe something like the following. The formula in the first cell is different than the others:
The numbers in between your target cells are still showing - is that a problem?
I am looking for a neat way of converting a cell from
Minutes:Seconds.Milliseconds to
Seconds.Milliseconds
i.e.
11.111 = 11.111
1:11.111 = 71.111
I have something in place at the moment but its a bit hacky and I am sure there must be some nice excel feature to do this for me :P
Thanks!
Do this:
Place values 0:0:11.111 and 0:1:11.111 in cells B3 and B4 respectively.
Now format it to account for the milliseconds... Select cells B3 and B4, right click and choose Format Cells. In Custom, put the following in the text box labeled Type:
[h]:mm:ss.000
Now on cell C3 put the following formula:
=B3*86400
Fill C4 with the same formula...
Format column C as Number with 3 decimal places.
You're done! :)
Here's a screenshot of the attempt I made and that worked:
Edit:
As you wanna enter only MM:SS.ms you can format the entire B column with a custom format like: mm:ss.000. Now you can enter values as 02:11.111 and it'll convert it accordingly giving you 131.110. Hope it helps.
say your time is in cell A1, place this formula in B1
=IF(LEN(A1)>5,VALUE(TEXT(A1,"[ss].00")),A1)
If the time is less than a minute it outputs the time unaltered, greater than 1 minute it converts it to seconds & milliseconds (2 decimal places).
This will only work if your time in A1 is 10 seconds or greater.