+ Reply to Thread
Results 1 to 3 of 3

macro to format data label, and add comma and percentage

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    macro to format data label, and add comma and percentage

    Hello. I have data labels in a chart. I would like to create a macro that takes the column to the right of each data label value and adds that as a % after the data label number.

    For example, I have 20,000 in N4 (data label), I would like the macro to add a comma and then select the column to the right which in this case is a percentage. So it would be 20,000, +10% in all of the data labels. Thanks!!

  2. #2
    Forum Contributor meus's Avatar
    Join Date
    11-25-2014
    Location
    kathmandu
    MS-Off Ver
    2010/ 2013
    Posts
    287

    Re: macro to format data label, and add comma and percentage

    Attach Workbok first and describe in brief what youu want to do..

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,720

    Re: macro to format data label, and add comma and percentage

    Is this what you are looking for?

    Option Explicit
    
    Sub mart()
        Dim lr As Long
        lr = Range("N" & Rows.Count).End(xlUp).Row
        Dim i As Long
        
        For i = 4 To lr
        Range("N" & i).Value = Range("N" & i) & ", +" & Range("O" & i).Value
        Next i
    
    End Sub
    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

+ 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. With a move label macro, prevent label from moving onto another label
    By SocratesJC in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2014, 12:34 AM
  2. [SOLVED] Overlaping bar chart percentage data label location help
    By rs1aj in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-14-2014, 09:55 AM
  3. Macro to format data point and add label in chart
    By Scottmk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2010, 08:54 AM
  4. [SOLVED] Data Label Format
    By Cody in forum Excel General
    Replies: 0
    Last Post: 07-01-2005, 05:05 PM
  5. [SOLVED] Percentage in data label
    By Darryl in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-09-2005, 11:05 AM

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