Validating Days of the Week

jmadux2003

New Member
Joined
May 12, 2015
Messages
2
I'm trying to force all cells for a particular column to only allow any combination of the following characters: M, T, W, R, F, S, U.

So all of the following would be valid:
MTW
RTS
UWM
MTWRF

But the following would not:
M T W R F
WQRF

What kind of custom formula do I need in order to allow this kind of character restriction?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Give the Validation formula a try...

=ISNUMBER((SUMPRODUCT(0+FIND(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),"MTWRFSU"))))
 
Upvote 0
Give the Validation formula a try...

=ISNUMBER((SUMPRODUCT(0+FIND(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),"MTWRFSU"))))

Couple of questions:
1) How can I change "A1" so that the formula works on every cell? I.e., A1, A2, A3, ..., AN
2) Is there a way to write the formula so the column doesn't have to be explicitly hardcoded? Meaning, instead of "A1", is there a dynamic variable like $CELL that can be used instead.
 
Upvote 0
Couple of questions:
1) How can I change "A1" so that the formula works on every cell? I.e., A1, A2, A3, ..., AN
2) Is there a way to write the formula so the column doesn't have to be explicitly hardcoded? Meaning, instead of "A1", is there a dynamic variable like $CELL that can be used instead.
Select all of the cells in column A that you want it to apply to starting with cell A1, then use the formula I posted in the Data Validation dialog as a Custom Formula... it will automatically apply to all of the selected cells.
 
Upvote 0

Forum statistics

Threads
1,215,093
Messages
6,123,068
Members
449,091
Latest member
remmuS24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top