+ Reply to Thread
Results 1 to 2 of 2

Need to copy the RESULT of a format

Hybrid View

  1. #1
    Registered User
    Join Date
    06-16-2009
    Location
    Mighigan, USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Need to copy the RESULT of a format

    Hi,

    I'm relatively new to VBA in Excel and I've got an issue where that I need to copy the RESULT of a format, and use it in my calculations. Another way to phrase this would be that I need to make the format apply to the underlying data, not just change how it is displayed.

    Is there an easy way to do this? Or am I going to have to write another macro to compute this value?

    Thanks in advance!
    Charles

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Need to copy the RESULT of a format

    You can use the text value of a cell in VBA

    Range("A2").Value = Range("A1").Text
    so say for ex. A1 contains the value 2 but has a custom format applied to it of: "S"000

    such that it appears as S002, the above would set A2 to be S002 rather than 2.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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