+ Reply to Thread
Results 1 to 8 of 8

Create a macro wherein if the condition in one rage is met it willcopy to another sheet

  1. #1
    Registered User
    Join Date
    11-20-2015
    Location
    philippines
    MS-Off Ver
    2007
    Posts
    5

    Create a macro wherein if the condition in one rage is met it willcopy to another sheet

    Hi Good Day,

    I need your help because I need the right code for macro in excel wherein if the condition that the posting acct# is equal to the value 8001001
    the column posting acct#, amount, emp name and expense columns will be copied to another worksheet. Thanks for the help in advance.

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Create a macro wherein if the condition in one rage is met it willcopy to another shee

    Welcome to the forum Rhyne,

    There is far too little information here. You should really should consider posting a copy of your workbook.


    Regards,

    David

    Please remember, your request is clearer if you attach a sample workbook.
    - Click on Go Advanced and click on the Paper Clip.

    If this has been of assistance, please advise.
    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  3. #3
    Registered User
    Join Date
    11-20-2015
    Location
    philippines
    MS-Off Ver
    2007
    Posts
    5
    Hi

    I attached the sample file.
    I have to copy it to the other sheet in the same file.
    Thanks for your help.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Create a macro wherein if the condition in one rage is met it willcopy to another shee

    The attached workbook will copy the data you indicated onto Sheet2 whenever you enter 8001001 onto column "F"

    ryne copy to another sheet.xlsm

    I hope this helps, please let me know!

    Regards,

    David


    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  5. #5
    Registered User
    Join Date
    11-20-2015
    Location
    philippines
    MS-Off Ver
    2007
    Posts
    5

    Re: Create a macro wherein if the condition in one rage is met it willcopy to another shee

    Hi David,

    Thanks for the help.

    Can you tell me how can i create the macro in excel? the current worksheet where the columns are being copied name as RAWDATA then the sheet where it will be pasted is DATA.
    I tried to replace the data in the excel file you have sent but it does not show those columns with 8001001.

    Thanks.

  6. #6
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Create a macro wherein if the condition in one rage is met it willcopy to another shee

    Sorry Ryne,

    I was thinking that you wanted to move the data to another sheet if you changed the Posting Acct # to 8001001. Having looked back at your request, I don't know where I got that idea from!

    ryne copy to another sheet V2.xlsm

    Here is a new version with a button you can click that will move all the data that meets the condition. (The code that copies the data is still there so that if you change a cell in Col F to 8001001, the data will copy, but you will get a prompt).

    I hope this helps, please let me know!

    Regards,

    David


    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  7. #7
    Registered User
    Join Date
    11-20-2015
    Location
    philippines
    MS-Off Ver
    2007
    Posts
    5

    Re: Create a macro wherein if the condition in one rage is met it willcopy to another shee

    Hi David,

    Thank you for this. This really helps.

  8. #8
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Create a macro wherein if the condition in one rage is met it willcopy to another shee

    You're welcome! Don't forget to click the Star (bottom left), and mark the thread as SOLVED

    DAC

+ 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. [SOLVED] Macro to create multiples sheets according to a condition
    By tsakta13ole in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2015, 05:42 AM
  2. [SOLVED] Macro to insert a rage of cells deletes previous content if range is blank
    By 54ed in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 12:01 AM
  3. [SOLVED] Macro to insert a rage of cells deletes previous content if range is blank
    By 54ed in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-23-2014, 05:59 PM
  4. Replies: 2
    Last Post: 05-01-2013, 12:26 PM
  5. Replies: 5
    Last Post: 11-03-2012, 04:22 PM
  6. Deleting rows based on condition:help me create a macro
    By chrisjack001 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2010, 07:34 PM
  7. : help to create critical macro to copy data from rawdata file by 5 condition and pas
    By nirmala_kr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2010, 01:57 PM

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