+ Reply to Thread
Results 1 to 7 of 7

Check Field data type (cell format) based on named range

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Check Field data type (cell format) based on named range

    Hi,

    it is possible to check cell format based on named range?

    Best,
    Jacek

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Check Field data type (cell format) based on named range

    guess so?

    Please Login or Register  to view this content.
    Last edited by humdingaling; 03-26-2019 at 02:57 AM. Reason: dont need displayformat, debug window instead of msgbox
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Check Field data type (cell format) based on named range

    Hmm,

    thank you.

    I have named range "VariableRange" which refers to cell A2 in specific worksheet.
    So only one cell i need to refer and read cell format.

    And cell format you can have Custom/General/Date/Number etc.

    Best,
    Jacek

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Check Field data type (cell format) based on named range

    Something like:

    Please Login or Register  to view this content.
    It is not working here.
    Best,
    Jacek

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Check Field data type (cell format) based on named range

    Maybe something like here?

    Please Login or Register  to view this content.
    can you help with that?

    Best,
    Jacek

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,008

    Re: Check Field data type (cell format) based on named range

    n.referstorange.numberformat should be enough if they are all one cell. You'll need error handling for any names that aren't ranges.
    Everyone who confuses correlation and causation ends up dead.

  7. #7
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Check Field data type (cell format) based on named range

    thank you rorya! Brilliant like always

    n.referstorange.numberformat working like a charm.

    Best wishes,
    Jacek

+ 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] Check if cell value exists in another named range
    By Zach_A in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2018, 12:04 PM
  2. [SOLVED] Check if cell is a named range
    By amphinomos in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-27-2015, 12:15 PM
  3. check if Access field with number data type is blank
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2015, 11:35 AM
  4. Automatically Assign a Named Range Based on a Field
    By TeoneSofle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2014, 04:14 AM
  5. SUM columns based on a named range (with more than one field) and a row ID
    By aaronnoparstak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-13-2012, 07:02 PM
  6. How To Check What type of Format the cell is Using VB.Net
    By pavel3002 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2011, 06:26 PM
  7. Replies: 1
    Last Post: 06-03-2006, 10:55 PM

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