Text Format

cyliyu

New Member
Joined
Jul 7, 2015
Messages
23
I have a sheet for user to keyin the data.
The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099.
The number after the "/" is always 4 digits, it was a data code.
The issue was end-user sometimes forgot to put a "space" before and/or after "/".
how can i custom the cell format to auto check and add the space?
 
Is it possible that an entry in the correct format of "xxx / xxx" does not exist in column A of Master? If that is possible, do you want the DV to allow or disallow the entry?

The master sheet was maintained and check daily by the store supervisor and validated by the manager.
There is a chance the entry by the end-user cannot be found in the master list, therefore, it should disallow.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
So try this in your DV

=AND(COUNTIF($D$6:$K$30,D6)=1,ISNUMBER(FIND(" / ",D6)),VLOOKUP(D6,Master!$A$2:$F$1000,6,0)<>"supplier 1",VLOOKUP(D6,Master!$A$2:$F$1000,6,0)<>"supplier 2")
 
Upvote 0
So try this in your DV

=AND(COUNTIF($D$6:$K$30,D6)=1,ISNUMBER(FIND(" / ",D6)),VLOOKUP(D6,Master!$A$2:$F$1000,6,0)<>"supplier 1",VLOOKUP(D6,Master!$A$2:$F$1000,6,0)<>"supplier 2")

Thanks & appreciate your help.
Didn't know I can use so many formula in the DV.
 
Upvote 0
I have one last question.
We using the copy and paste special -> validation to other cells. it is not working.
I have to manually replace all the 200 cells. it that normal when using such formula?
 
Upvote 0
We using the copy and paste special -> validation to other cells. it is not working.
1. Where are you copying from?
2. Where are you pasting to?
3. What are the symptoms of "it is not working"?
4. Did you further alter the DV formula in any way?

With the DV formula suggested in cell D6, I was able to Copy - Paste Special (Validation) to the other cells in the range D6:K30
 
Upvote 0
Whiling waiting for the reply, I manage to find the error.
A "=" sign was missing. sorry for the troubles. :(
 
Upvote 0
Cheers. Glad you got it sorted. Thanks for letting us know. :)
 
Upvote 0

Forum statistics

Threads
1,224,747
Messages
6,180,712
Members
452,995
Latest member
isldboy

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