+ Reply to Thread
Results 1 to 5 of 5

Do-Loop to Add Text to Labels

  1. #1
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Do-Loop to Add Text to Labels

    Hello forum,

    A little out of my league here with Labels that aren't being used within charts. The attached workbook has my example that I'm hoping will make more sense.

    I am trying to create a scheduling tool that will adjust label sizes according to Start and Finish dates that are given in columns C and D. A code a colleague of mine has produced seems to do the trick, but with static ranges. I'd like for a loop to cycle through column A, and bin the necessary fruits according to column G, and have the label code (or some variant thereof) execute and incorporate a new label for each piece of fruit, signaling it's duration or shelf life.

    Label code given below:

    Please Login or Register  to view this content.
    Hopefully this explanation wasn't clear as mud!?
    Attached Files Attached Files
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  2. #2
    Registered User
    Join Date
    02-24-2016
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    92

    Re: Do-Loop to Add Text to Labels

    Hi,

    I have tried something.
    First I have added some names to ranges on the sheet.

    Hoop this will help you

    WouterM
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Do-Loop to Add Text to Labels

    This is great, thank you! I think I shot myself in the foot with data setup, because the two data sets are actually on separate worksheets. Attached is more like how it is setup. I'm working to replace the worksheet references now, but you may be quicker.

    Thanks again for your help though!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-24-2016
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    92

    Re: Do-Loop to Add Text to Labels

    Hi,

    I have changed my version into a workkbook with two sheets.
    On de example sheet I have added a button to start the proces.
    Which now first removes the existing shapes before adding the wanted ones.

    Hoop this helps,

    WouterM
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Do-Loop to Add Text to Labels

    Thanks for the quick reply, this is perfect for what I need!

+ 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. For Each loop for data labels in a pivot table
    By Phixer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2015, 11:51 AM
  2. [SOLVED] How do I align text left the horizontal axis labels and wrap text them?
    By rs1aj in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 02-11-2015, 03:52 AM
  3. Change chart/pivot table numeric labels to associated text labels
    By petschek in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-07-2014, 05:32 PM
  4. How to use loop for doing something in a form's labels
    By rafitibi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2012, 07:02 PM
  5. loop through userform labels?
    By losmi8 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2011, 06:34 AM
  6. Efficien loop code to format labels
    By flyhigh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2009, 09:10 AM
  7. Setting up a simple loop to fill labels?
    By justchris in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2005, 07:50 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