+ Reply to Thread
Results 1 to 8 of 8

Custom formatting

  1. #1
    Registered User
    Join Date
    07-26-2016
    Location
    Virginia
    MS-Off Ver
    2016
    Posts
    11

    Custom formatting

    Hello,

    I have a custom formatting question.

    I'm importing data from the web using a macro. The data downloads as

    12.76B
    441.61M
    101.78M

    billions and millions

    I then would like to take the data and multiply it by other values. However I cannot multiply with the B and M values inside the cell. Is there a way I can create a macro that would automatically format these cells? Perhaps into thousands to look like

    12,760
    441.61
    101.78

    Thanks in advance!
    Last edited by knebelcm; 07-26-2016 at 11:35 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Custom formatting

    I kind of understand your question but your example doesn't seem to match. It does match if you change the word "thousands" to "millions".

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Custom formatting

    Hi there,

    For a value in Cell A1, try the following conversion formula:

    Please Login or Register  to view this content.
    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  4. #4
    Registered User
    Join Date
    07-26-2016
    Location
    Virginia
    MS-Off Ver
    2016
    Posts
    11

    Re: Custom formatting

    Thanks for your answers!

    Apologies but I'm a real newb with Macros (just discovered them yesterday). I thought I could correctly add the answer into the excel page but I wasn't able to. I've attached the document I'm using and the macro is already inserted. Would you be able to add the macro into the document and reload so I can see just exactly how its done?

    Thanks so much for your assistance.

    Best,
    Chris
    Attached Files Attached Files

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Custom formatting

    Hi again Chris,

    See if the formulas in the attached workbook do what you need.

    Hope this helps - as before, please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Custom formatting

    Quote Originally Posted by knebelcm View Post
    I've attached the document I'm using and the macro is already inserted.
    The file you attached has no data and has only one brief macro that is unrelated to your original question, which said
    I'm importing data from the web using a macro.

  7. #7
    Registered User
    Join Date
    07-26-2016
    Location
    Virginia
    MS-Off Ver
    2016
    Posts
    11

    Re: Custom formatting

    This is an elegant solution, thank you Greg!

  8. #8
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Custom formatting

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated

    You're very welcome - glad I was able to help.

    Best regards,

    Greg M

+ 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. Custom formatting issue using conditional formatting
    By wrongway15 in forum Excel General
    Replies: 2
    Last Post: 07-13-2014, 03:18 PM
  2. [SOLVED] Formatting Numarical Values with Custom Formatting
    By excelneub in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 07-11-2014, 04:06 PM
  3. Custom Formatting help
    By floricita in forum Excel General
    Replies: 2
    Last Post: 08-16-2011, 09:56 AM
  4. Custom formatting
    By blee_gt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2009, 04:15 PM
  5. [SOLVED] custom formatting help!??
    By hello1 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-13-2008, 01:45 PM
  6. Replies: 1
    Last Post: 03-10-2006, 11:30 AM
  7. [SOLVED] custom formatting??
    By PattiTechWriter in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-05-2005, 06:40 PM

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