Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

Google Sheets: Need conditional format formula to parse number-hyphen-number input into "2-Tuesday" type

$
0
0

I want to write a conditional formatting formula that will convert

1-3 to 1-Thursday,

2-2 to 2-Wednesday,

3-1 to 3-Tuesday,

4-0 to 4-Monday.

The rationalization being I have a list of committee meeting dates, which fall on ordered days of the week, not specific days. So I want a date type (as in "second Wednesday") that can be inputted and sorted numerically but read by the user as a string. I already know that the following formula will spit out a "Monday":

=TEXT(WEEKDAY(0),'dddd')

and that I can concatenate specific valued strings such as:=CONCATENATE(CONCATENATE("2,"-"),TEXT(WEEKDAY(0),"dddd"))

to make "2-Monday".

So how can I pose a formula that will interpret a pattern in the form number-hyphen-number to this for arbitrary numeric values (assuming the 3rd character is a number 0-6)?


Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>