+ Reply to Thread
Results 1 to 6 of 6

Code/Macro that takes fluctuating info in one column and makes static in another column.

  1. #1
    Registered User
    Join Date
    07-14-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    15

    Code/Macro that takes fluctuating info in one column and makes static in another column.

    Hello all,

    Attached is a spreadsheet example of my issue.

    As you can see from the attachment, I run the report generator for the specific fund number, it populates new data in column C that I have to copy/paste into column B. The SS is just a short example, but the list of funds in column A can reach well into 100+ rows.

    Cell B3 can't be B3=C3 (and then dragged down) because when I run the report generator for another fund, it will be blank.

    For awhile I had a button with a macro assigned that when after I run the report generator I would click it, and it would take the first row, copy it, and paste it onto another SS. This didn't work too well, because sometimes the first 10 or so rows were the same fund, so I had to run the report generator over and over again for the same fund instead of just copying a block at a time and pasting over to B.

    Basically I'm trying to find a way to program it to where it takes all the similar funds in column A, and then takes the generated report in C, and plugs it into B.

    Anyhoo, if anyone has done something similar let me know! Thanks!
    Attached Files Attached Files
    Last edited by Sonny Crockett; 09-18-2013 at 08:03 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: Stumped on how to find a way to program a Macro to do tedious work.

    Hi Sonny,

    Save your workbook as macro-enabled and paste this event-code into the sheet module:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    07-14-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Stumped on how to find a way to program a Macro to do tedious work.

    Thanks for the quick response. I could definitely use that info for other spreadsheets!

    Unfortunately, that code seems to pull in whatever is in C to B, so when I run the generator that pulls info into C for the fund number in A, it will put blanks in B for all the funds not queried in A.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: Stumped on how to find a way to program a Macro to do tedious work.

    Do you mean blanks or nulls? If nulls then try this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-14-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Stumped on how to find a way to program a Macro to do tedious work.

    That works great! Could I also use that for text strings in column C? What if it's a little tricky - for instance if for the non-queried funds in column A, column C returns "No Qualifier Data." But the tricky part being that "No Qualifier Data" could be the correct info that would be returned in column C when running the generator? Like if I entered this:

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 3 Then
    If Target <> "No Qualifier Code" Then Target.Offset(0, -1) = Target
    End If: End Sub

    And the correct info pulled from the generator in column C was in fact "No Qualifier Code," what could I add to the code that will tell it not to update B?
    Attached Files Attached Files

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: Code/Macro that takes fluctuating info in one column and makes static in another colum

    Yes, that should work too!

+ 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. Program Macro To Work On A Certain Workbook
    By rjm87 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-26-2012, 09:18 AM
  2. creating macro VB in Excel - find and move program
    By DictatorDraco in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-01-2006, 03:50 PM
  3. Expediting Tedious Work
    By mikemillsjr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-20-2005, 06:06 PM
  4. Expediting Tedious Work (Will Pay!)
    By mikemillsjr in forum Excel General
    Replies: 1
    Last Post: 12-19-2005, 03:09 PM
  5. Replies: 7
    Last Post: 08-24-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