![]() |
Define a cell value base on the date
I'd like to define the value of a cell to be the first letter of the day of
the week, based on the current year, when I supply the Month and Day from other cells. Example: A1 = "April" A2 = 1 Since April 1st of this year was a Sunday, the value of my cell, A3, would be "S" If I changed A2 to the number 10, then A3 would change to "T" because the 10th of April of this year is a "T"uesday. I appreciate any help anyone can provide on this. Jimmy |
Define a cell value base on the date
=CHOOSE(WEEKDAY(DATEVALUE(A1&" "&A2)),"S","M","T","W","T","F","S")
"BaseballFan" wrote: I'd like to define the value of a cell to be the first letter of the day of the week, based on the current year, when I supply the Month and Day from other cells. Example: A1 = "April" A2 = 1 Since April 1st of this year was a Sunday, the value of my cell, A3, would be "S" If I changed A2 to the number 10, then A3 would change to "T" because the 10th of April of this year is a "T"uesday. I appreciate any help anyone can provide on this. Jimmy |
Define a cell value base on the date
Just a thought...
What weekday is this: S Saturday or Sunday? =IF(OR(A1="",A2=""),"",CHOOSE(WEEKDAY(A1&A2),"Su", "M","Tu","W","Th","F","Sa")) Biff "BoniM" wrote in message ... =CHOOSE(WEEKDAY(DATEVALUE(A1&" "&A2)),"S","M","T","W","T","F","S") "BaseballFan" wrote: I'd like to define the value of a cell to be the first letter of the day of the week, based on the current year, when I supply the Month and Day from other cells. Example: A1 = "April" A2 = 1 Since April 1st of this year was a Sunday, the value of my cell, A3, would be "S" If I changed A2 to the number 10, then A3 would change to "T" because the 10th of April of this year is a "T"uesday. I appreciate any help anyone can provide on this. Jimmy |
All times are GMT +1. The time now is 04:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com