Data Validation Must Contains mark ' (approstrops) in Left

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,077
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all,

i need your help how create data validation with criteria :
- start mark ' (approstrops) in left position like example this below :

'6136716
'981289
'2091234
etc...

i have using formula =LEFT(B3)="'", but still not working...

any help me, thanks in advance...

m.susanto
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Not sure I understand your entire issue. However, the syntax for the left function is =Left(text,#characters). So you are missing the number of characters in your function
 
Upvote 0
apparently, you want number to be input as text. You don't need data validation to achieve that. Just change the format of the cells (before input) to text.


hi all,

i need your help how create data validation with criteria :
- start mark ' (approstrops) in left position like example this below :

'6136716
'981289
'2091234
etc...


m.susanto
 
Upvote 0
thanks guys, i means i want to input data with criteria start mark ' if not the data ignore...
 
Upvote 0
if the inputting data not contains mark ' (in left position) so ignore..
how to make it (formula) with "custom" in Data Validation feature...
 
Upvote 0
thanks m fexcel, i confused when i use mark " not ' my formula is correct..

=LEFT(B8)=""" but if i i replace mark " with mark '

for detail :
=LEFT(B8)="""------ the result is correct
=LEFT(B8)="'"------- the result is wrong

how do solve?
 
Upvote 0
but putting ' in front of any input basically tells Excel that you are going to input text. Excel doesn't trick the ' in the front as a character. I wonder if there is a way to solve your problem.

anyway, back to my question, why you need to restrict user to input with '?



thanks m fexcel, i confused when i use mark " not ' my formula is correct..

=LEFT(B8)=""" but if i i replace mark " with mark '

for detail :
=LEFT(B8)="""------ the result is correct
=LEFT(B8)="'"------- the result is wrong

how do solve?
 
Upvote 0
hi m fexcel, i have formula this below

inputting -------------after formula
(=IF(--LEFT($B7;2)<20;20&$B7;19&$B7)

9810316 --------------199810316 (result after formula above)
'0006137--------------200006137 (result after formula above)

without ' --------------196137 (wrong result)

any ideas?
 
Upvote 0
I guess your problem is when someone input 0006137, Excel turns it into 6137 automatically and thus making your formula not work.

My suggestion in post #3 should help. Have you tried that?

Anyway, if all your input is 7-digit, and you insist on Data Validation, you may try the following D.V.
Allow:
Text Length
Data:
Equal to
Length: 7

then in the Error Alert, you may prompt the user to input ' beforehand IF the number they are going to input starts with 0

Hope this helps.



hi m fexcel, i have formula this below

inputting -------------after formula
(=IF(--LEFT($B7;2)<20;20&$B7;19&$B7)

9810316 --------------199810316 (result after formula above)
'0006137--------------200006137 (result after formula above)

without ' --------------196137 (wrong result)

any ideas?
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

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