+ Reply to Thread
Results 1 to 8 of 8

Transfer data to specific range based on condition

  1. #1
    Registered User
    Join Date
    03-14-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Transfer data to specific range based on condition

    Dear Excel Experts,

    I need to develop a Macro that performs the following when the bottom "Submit" is pressed:
    If In Book 1, Cell "C8" = "Q1" then the Macro will select Cells(B7, C7, D7, E7, E69, F69, G69, B8) and paste the result to Book2 in a range between A2:F19
    If in Book 1 Cell "C8" = "Q2" then the Macro will select Cells(B7, C7, D7, E7, E69, F69, G69) and paste the result to Book2 in a range between A20: F42
    If in Book 1 Cell "C8" = "Q3" then the Macro will select Cells(B7, C7, D7, E7, E69, F69, G69) and paste the result to Book2 in a range between A43: F62
    If in Book 1 Cell "C8" = "Q4" then the Macro will select Cells(B7, C7, D7, E7, E69, F69, G69) and paste the result to Book2 in a range between A62: F82

    I look forward t receiving your thoughts

    Kind Regards
    Last edited by khatibcell; 03-15-2013 at 08:59 AM.

  2. #2
    Registered User
    Join Date
    03-14-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Challenging Macro needed

    I meant to past the results in the next available row of the above ranges

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Challenging Macro needed

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    03-14-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Challenging Macro needed

    Hi.
    As advised, changed title to something more descriptive.

    Thank you,

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Transfer data to specific range based on condition

    Do you have a sample file or files that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  6. #6
    Registered User
    Join Date
    03-14-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Transfer data to specific range based on condition

    please find sample files attached for reference.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-14-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Transfer data to specific range based on condition

    Hello, any help please?

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Transfer data to specific range based on condition

    Will the ranges in Book 2 always be the same?

+ 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