+ Reply to Thread
Results 1 to 6 of 6

percentage trick

  1. #1
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Leeds
    MS-Off Ver
    Microsoft Office 365
    Posts
    271

    percentage trick

    Good evening,

    I am learning about data cleaning. For example in Column A, values are given as 63.8, 62.4, 37.5 instead of 63.80 %, 62.40 %, 37.50 %, etc . I created another column and managed to get the desired out 63.80 %, 62.40 %, 37.50%. Is there a way I can achieve the following result without creating another column?
    Desired output in column A: 63.80 % (two decimal places and % sign), 62.40 %, 37.50%, 48.70% and so on.
    Thank you so much for your help!
    Attached Files Attached Files

  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,705

    Re: percentage trick

    Type 100 into any cell
    Copy that cell
    Select all of your data
    Paste Special > Divide
    Change format to %
    Delete the cell with 100
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: percentage trick

    Please Login or Register  to view this content.

    How to install your new code
    • Copy the Excel VBA code
    • Select the workbook in which you want to store the Excel VBA code
    • Press Alt+F11 to open the Visual Basic Editor
    • Choose Insert > Module
    • Edit > Paste the macro into the module that appeared
    • Close the VBEditor
    • Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)


    To run the Excel VBA code:
    • Press Alt-F8 to open the macro list
    • Select a macro in the list
    • Click the Run button
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Leeds
    MS-Off Ver
    Microsoft Office 365
    Posts
    271
    Quote Originally Posted by 6StringJazzer View Post
    Type 100 into any cell
    Copy that cell
    Select all of your data
    Paste Special > Divide
    Change format to %
    Delete the cell with 100
    Thank you so much

  5. #5
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Leeds
    MS-Off Ver
    Microsoft Office 365
    Posts
    271
    Quote Originally Posted by alansidman View Post
    Please Login or Register  to view this content.

    How to install your new code
    • Copy the Excel VBA code
    • Select the workbook in which you want to store the Excel VBA code
    • Press Alt+F11 to open the Visual Basic Editor
    • Choose Insert > Module
    • Edit > Paste the macro into the module that appeared
    • Close the VBEditor
    • Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)


    To run the Excel VBA code:
    • Press Alt-F8 to open the macro list
    • Select a macro in the list
    • Click the Run button
    Thank you. I don't know much about VBA. Can you apply this logic to multiple columns in the same worksheets? How can we do that?

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: percentage trick

    Yes. This concept can be applied to multiple columns. Supply a sample worksheet and I will demonstrate.

+ 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. Vlookup Trick?
    By a.siddiqi93 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2021, 05:29 PM
  2. [SOLVED] formatting trick
    By great_AS in forum Excel General
    Replies: 1
    Last Post: 02-03-2017, 06:08 AM
  3. [SOLVED] Run codes only in my PC or any other trick
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2016, 02:54 PM
  4. Lookup Question (Tricky)
    By usmanfarok in forum Excel General
    Replies: 1
    Last Post: 06-24-2012, 07:19 AM
  5. Tricky trick
    By Dário Sá in forum Excel General
    Replies: 1
    Last Post: 12-20-2011, 02:57 PM
  6. Help! Trick Question
    By Tanmay in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2010, 11:24 AM
  7. Macro box trick
    By danguyen_uci in forum Excel General
    Replies: 5
    Last Post: 05-13-2007, 02:09 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