+ Reply to Thread
Results 1 to 16 of 16

Data Validation: 11 digits (numbers) in a merged cell

  1. #1
    Registered User
    Join Date
    10-02-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    36

    Post Data Validation: 11 digits (numbers) in a merged cell

    Hi,

    I want to apply Data Validation to 11 digits (numbers) in a merged cell (F4:M4).
    I have tried Data Validation>Text Length>Equal To> =AND(ISNUMBER(F$4),LEN(F$4)=11) but it does not work.
    Also tried using Data Validation>Custom & then same formula, does not work.
    There should be 11 digits starting with 0 & all should be numbers.

    Please help.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Data Validation: 11 digits (numbers) in a merged cell

    1. Why are you merging cells. Just use 1 and widen it.

    2. Leading zeros will be dropped unless the cell is pre-formatted as TEXT.

    3. Use this:
    =AND(ISNUMBER(F4+0),LEN(F4)=11,LEFT(F4,1)="0")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: Data Validation: 11 digits (numbers) in a merged cell

    Set the data validation to whole number - between 0 and 99999999999 (11 lots of 9).

    Set custom formatting for the cell - 00000000000 (11 lots of 0).
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    10-02-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    36

    Re: Data Validation: 11 digits (numbers) in a merged cell

    Quote Originally Posted by Glenn Kennedy View Post
    1. Why are you merging cells. Just use 1 and widen it.

    2. Leading zeros will be dropped unless the cell is pre-formatted as TEXT.

    3. Use this:
    =AND(ISNUMBER(F4+0),LEN(F4)=11,LEFT(F4,1)="0")
    Hi Glenn,
    Thanks. It worked.

  5. #5
    Registered User
    Join Date
    10-02-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    36

    Re: Data Validation: 11 digits (numbers) in a merged cell

    Quote Originally Posted by AliGW View Post
    Set the data validation to whole number - between 0 and 99999999999 (11 lots of 9).

    Set custom formatting for the cell - 00000000000 (11 lots of 0).
    Hi AliGW,

    I actually knew these tips but wanted a formula to restrict user to enter exactly 11 numbers & show an error message in case of wrong input which I thought was not possible without Data Validation.
    Anyway, the formula given by Glenn worked.
    Thanks for your time.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Data Validation: 11 digits (numbers) in a merged cell

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: Data Validation: 11 digits (numbers) in a merged cell

    Quote Originally Posted by excellon View Post
    Hi AliGW,

    I actually knew these tips but wanted a formula to restrict user to enter exactly 11 numbers & show an error message in case of wrong input which I thought was not possible without Data Validation.
    Anyway, the formula given by Glenn worked.
    Thanks for your time.
    So if you knew this already, why didn't you say you didn't want to do it that way?

    I can't honestly see that it makes one scrap of difference which approach you use. Both use data validation.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Data Validation: 11 digits (numbers) in a merged cell

    Ali> Your formula would permit entry of a 10 digit number. It would simply add an extra leading zero.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: Data Validation: 11 digits (numbers) in a merged cell

    That's true, I suppose.

  10. #10
    Registered User
    Join Date
    10-02-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    36

    Re: Data Validation: 11 digits (numbers) in a merged cell

    Quote Originally Posted by AliGW View Post
    So if you knew this already, why didn't you say you didn't want to do it that way?

    I can't honestly see that it makes one scrap of difference which approach you use. Both use data validation.
    Hi AliGW,
    I again appreciate your help.
    But in your process if I enter 10 or lower number of digits as a mistake, it still converts it to an 11 digit number by adding a 0 prior to it.
    Hope you understand.
    Thanks.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: Data Validation: 11 digits (numbers) in a merged cell

    See post #9.

  12. #12
    Registered User
    Join Date
    10-02-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    36

    Re: Data Validation: 11 digits (numbers) in a merged cell

    Give me the link Pls.
    Thanks.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: Data Validation: 11 digits (numbers) in a merged cell

    The link? Just look up to the post above your last one!!!

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Data Validation: 11 digits (numbers) in a merged cell

    What link are you talking about???

  15. #15
    Registered User
    Join Date
    10-02-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    36

    Re: Data Validation: 11 digits (numbers) in a merged cell

    Sorry, both of you guys.
    I have got it.
    Thanks.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: Data Validation: 11 digits (numbers) in a merged cell

    No worries.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel Data Validation Only accepts 12 Digits
    By aarona in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2019, 10:49 PM
  2. [SOLVED] Formula for Excel Data Validation - Input Mask for Ten Digits
    By Hedy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-07-2018, 10:20 AM
  3. Data Validation: 7 or 8 digits only, preserve leading zeros
    By Feefee32 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-26-2018, 12:47 PM
  4. [SOLVED] Combine digits in double digits in 4 numbers without repeating each other
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-14-2014, 08:18 AM
  5. [SOLVED] Data Validation Allow only even numbers based on another cell value
    By Bushopper in forum Excel General
    Replies: 7
    Last Post: 04-30-2014, 08:53 AM
  6. Limit merged cell data; Place excess into next merged cell down
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2013, 10:35 PM
  7. Replies: 8
    Last Post: 10-14-2010, 08:24 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1