ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Format to: S-M-T-W-T-F-S? (https://www.excelbanter.com/excel-discussion-misc-queries/189845-format-s-m-t-w-t-f-s.html)

Ken

Format to: S-M-T-W-T-F-S?
 
Excel2003

Cell A2 contains a Date ... 01/01/08

Range G4:AK4 ... contains formula which calculates Days of the month 1-31
(G4 contains ... =A2 (format "d") ... H4 contains =G4+1 (format "d") ... etc)

Range G3:AK3 ... contains formula ... G3=G4, H3=H4, I3=I4 etc

Now I wish to format Range G3:AK3 to return ... S, M, T, W, T, F, S ...
based on day of week found in Range G4:AK4.

Can I do this with "format" ... or ... do I need formula? ... Either way ...
How?

Thanks ... Kha


sb1920alk

Format to: S-M-T-W-T-F-S?
 
The WEEKDAY formula should be what you're looking for.

"Ken" wrote:

Excel2003

Cell A2 contains a Date ... 01/01/08

Range G4:AK4 ... contains formula which calculates Days of the month 1-31
(G4 contains ... =A2 (format "d") ... H4 contains =G4+1 (format "d") ... etc)

Range G3:AK3 ... contains formula ... G3=G4, H3=H4, I3=I4 etc

Now I wish to format Range G3:AK3 to return ... S, M, T, W, T, F, S ...
based on day of week found in Range G4:AK4.

Can I do this with "format" ... or ... do I need formula? ... Either way ...
How?

Thanks ... Kha


Dave Peterson

Format to: S-M-T-W-T-F-S?
 
I think you'll need a formula:

=text(g3,"ddd")
will provide the 3 character abbreviation for the day.

So
=left(text(g3,"ddd"),1)
will return the first character of the abbreviation.



Ken wrote:

Excel2003

Cell A2 contains a Date ... 01/01/08

Range G4:AK4 ... contains formula which calculates Days of the month 1-31
(G4 contains ... =A2 (format "d") ... H4 contains =G4+1 (format "d") ... etc)

Range G3:AK3 ... contains formula ... G3=G4, H3=H4, I3=I4 etc

Now I wish to format Range G3:AK3 to return ... S, M, T, W, T, F, S ...
based on day of week found in Range G4:AK4.

Can I do this with "format" ... or ... do I need formula? ... Either way ...
How?

Thanks ... Kha


--

Dave Peterson

muddan madhu

Format to: S-M-T-W-T-F-S?
 
Try this in =CHOOSE(WEEKDAY(G3),"S","M","T","W","T","F","S")



On Jun 4, 12:09*am, Ken wrote:
Excel2003

Cell A2 contains a Date ... 01/01/08

Range G4:AK4 ... contains formula which calculates Days of the month 1-31
(G4 contains ... =A2 (format "d") ... H4 contains =G4+1 (format "d") .... etc)

Range G3:AK3 ... contains formula ... G3=G4, H3=H4, I3=I4 etc

Now I wish to format Range G3:AK3 to return ... S, M, T, W, T, F, S ...
based on day of week found in Range G4:AK4.

Can I do this with "format" ... or ... do I need formula? ... Either way ....
How?

Thanks ... Kha



Mike H

Format to: S-M-T-W-T-F-S?
 
Hi,

Put this in G3 and drag right

=LEFT(TEXT(G4,"ddd"),1)

Mike

"Ken" wrote:

Excel2003

Cell A2 contains a Date ... 01/01/08

Range G4:AK4 ... contains formula which calculates Days of the month 1-31
(G4 contains ... =A2 (format "d") ... H4 contains =G4+1 (format "d") ... etc)

Range G3:AK3 ... contains formula ... G3=G4, H3=H4, I3=I4 etc

Now I wish to format Range G3:AK3 to return ... S, M, T, W, T, F, S ...
based on day of week found in Range G4:AK4.

Can I do this with "format" ... or ... do I need formula? ... Either way ...
How?

Thanks ... Kha



All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com