+ Reply to Thread
Results 1 to 10 of 10

Applying custom data validation to multiple columns

  1. #1
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Applying custom data validation to multiple columns

    Hi all,

    If I entered this, with column A highlighted, as a custom data validation rule:

    Please Login or Register  to view this content.
    ... then no numbers - on their own - would be accepted anywhere within Column A. However I need to apply this to about 100 columns. Anyway of doing this?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Applying custom data validation to multiple columns

    As the range (A1) is a relative address, I would have thought you just needed to select all columns and apply the same DV.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Applying custom data validation to multiple columns

    Hi Trevor,

    Hmm - that's what I thought but it isn't working like that. Bummer.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Applying custom data validation to multiple columns

    Works fine for me. Selected entire columns A through to CU and applied the Custom Data Validation:
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Please see the attached example. You can't even type
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    in those columns because it will produce a numeric value.


    Regards, TMS

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Applying custom data validation to multiple columns

    Note: it will get confused if you don't have the whole columns selected. If you started from, say, cell C5 and put in
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    the Data Validation would be offset.

    Regards, TMS

  6. #6
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Applying custom data validation to multiple columns

    Hi TMS, sorry for the delay in getting back to you. I'm trying to select Columns A, C, D, F, H etc i.e. columns that aren't joined together.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Applying custom data validation to multiple columns

    One way: select column A, then Ctrl-Select columns C, E, G, etc (alternate columns). Then Ctrl-Shift back on column A.

    Apply the Custom DV:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Alternatively, select column A and apply the Custom DV:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then copy and paste to columns C, E, G, etc.

    See the updated example attached .


    Regards, TMS

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Applying custom data validation to multiple columns

    Just re-read your follow up. I thought it was alternate columns so you can forget that. The principle still applies. Select the columns, then go back to column A before applying the DV

    Regards, TMS

  9. #9
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Applying custom data validation to multiple columns

    OMG of course I never thought of having to go back to A1 to 'validate' the formula. Jeez. Aint it the simple things!

    Thanks very much! : )

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Applying custom data validation to multiple columns

    You're welcome. Thanks for the rep.

+ 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. Filter multiple columns based on multiple data validation fields
    By Jhunnieboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2014, 03:41 PM
  2. Applying Custom Macros to multiple worksheets
    By dshanman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2012, 09:36 PM
  3. Custom data validation with multiple criteria
    By gteachman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2011, 01:06 PM
  4. Applying Conditional Formatting to Data Validation
    By kcstewart in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-28-2007, 06:46 PM
  5. Data validation for Multiple columns
    By NC in forum Excel General
    Replies: 2
    Last Post: 05-11-2005, 09:06 AM

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