+ Reply to Thread
Results 1 to 3 of 3

Finding the Format of a Cell

  1. #1
    GusEvans
    Guest

    Finding the Format of a Cell

    Have a large dynamically populated worksheet (from another application).
    Some cells are date formats, currency, text, etc. I need allof the cells to
    be formatted as text without losing their 'look and feel'. I can't use
    =Cell("Format",A1) in VBA and can't find any equivalent. On dates I could
    say the equivalent of -
    If '=Cell("Format",A1)' = "D4" Then Format(Activecell.Value,"m/d/yy")

    Any Ideas?
    TIA-
    --
    Gus Evans

  2. #2
    Martin
    Guest

    RE: Finding the Format of a Cell

    if you use a Variant variable (which I guess you must), you can use the
    TypeName property (see VBA help)

    "GusEvans" wrote:

    > Have a large dynamically populated worksheet (from another application).
    > Some cells are date formats, currency, text, etc. I need allof the cells to
    > be formatted as text without losing their 'look and feel'. I can't use
    > =Cell("Format",A1) in VBA and can't find any equivalent. On dates I could
    > say the equivalent of -
    > If '=Cell("Format",A1)' = "D4" Then Format(Activecell.Value,"m/d/yy")
    >
    > Any Ideas?
    > TIA-
    > --
    > Gus Evans


  3. #3
    GusEvans
    Guest

    RE: Finding the Format of a Cell

    Thanks - worked like a charm.
    --
    Gus Evans


    "Martin" wrote:

    > if you use a Variant variable (which I guess you must), you can use the
    > TypeName property (see VBA help)
    >
    > "GusEvans" wrote:
    >
    > > Have a large dynamically populated worksheet (from another application).
    > > Some cells are date formats, currency, text, etc. I need allof the cells to
    > > be formatted as text without losing their 'look and feel'. I can't use
    > > =Cell("Format",A1) in VBA and can't find any equivalent. On dates I could
    > > say the equivalent of -
    > > If '=Cell("Format",A1)' = "D4" Then Format(Activecell.Value,"m/d/yy")
    > >
    > > Any Ideas?
    > > TIA-
    > > --
    > > Gus Evans


+ 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