+ Reply to Thread
Results 1 to 6 of 6

Macro to copy data in rows based on criteria

  1. #1
    Forum Contributor
    Join Date
    01-05-2010
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    747

    Macro to copy data in rows based on criteria

    I am looking for help to write a simple macro. Starting on column B66 is the word "Short" below that in the next 20 cells I would like a macro to write the word "Long Basket". If the word was "Long" then I would like the macro to write the word "Short Basket" for the next 20 cells (ex:B130). I would like a macro to loop through every example and do this. Can anyone help with this? thanks!!
    Attached Files Attached Files
    Last edited by rhudgins; 04-06-2010 at 08:24 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to copy data in rows based on criteria

    This should do it:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    01-05-2010
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    747

    Re: Macro to copy data in rows based on criteria

    Thank you so much this is perfect. One more question.

    For each example there is a ticker in column F(ex: F66, F87 ect.) Can you help me write a macro to identify the ticker in each example("ALK" in F66) and then find ALK in AA6:AN6 and copy the tickers below ALK in AB7:AB19 to F67? Loop this procedure through every example 1 through 78? Thank you so much!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to copy data in rows based on criteria

    Try this:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 04-05-2010 at 08:57 PM.

  5. #5
    Forum Contributor
    Join Date
    01-05-2010
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    747

    Re: Macro to copy data in rows based on criteria

    Thank you so much this is exactly what I needed! I really appreciate all of the work.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to copy data in rows based on criteria

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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