+ Reply to Thread
Results 1 to 4 of 4

Determine a cell's format and type

  1. #1
    Registered User
    Join Date
    10-18-2008
    Location
    New Jersey
    Posts
    12

    Determine a cell's format and type

    How do I determine a cell's type (e.g., numeric or string or formula) and if numeric, the format (e.g., currency, general, scientific) including the number of decimal places. Is there a function that returns the object's properties? Must I use isnumeric, isformula, and so on or is there one function that returns this information?
    Last edited by VBA Noob; 11-10-2008 at 02:16 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    There is an old excel 4 macro function get.cell that can return a heap of info about a cell.

    Have a look here to find out how to use it, and what each of the arguments are showing. Argument 48 will show if it is a formula for instance....

    HTH

    rylo

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387
    ihf,

    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

    Press and hold down the 'ALT' key, and press the 'F11' key.

    Insert a Module in your VBAProject, Microsoft Excel Objects

    Copy the below code, and paste it into the Module1.

    Please Login or Register  to view this content.

    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  4. #4
    Registered User
    Join Date
    10-18-2008
    Location
    New Jersey
    Posts
    12

    Exactly what I needed

    Thanks very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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