+ Reply to Thread
Results 1 to 5 of 5

VBA copying a range based on contents of a cell

  1. #1
    Registered User
    Join Date
    06-12-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    7

    VBA copying a range based on contents of a cell

    Hi All,

    I have attached excel file.
    the data sheet is data get from database.
    i need help with code that look for word "Itemized" (is colored in red ) and select the table below this word and copy it to a new sheet and rename the sheet as the mobile of that table.
    example of need table are also found in two sheets next to data sheet.

    Many thanks for your help
    Last edited by soso123; 08-25-2011 at 02:30 PM.

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: VBA copying a range based on contents of a cell

    Some questions:
    1) Will there be more than one itemized table?
    2) Will there be more than one mobile number?
    3) Do you want to move the table to its own sheet, or copy it to its own sheet leaving the original on the Data sheet?
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    06-12-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: VBA copying a range based on contents of a cell

    Thanks for the reply .

    1)Will there be more than one itemized table? yes for each mobile number
    2) Will there be more than one mobile number? yes, but i need just to copy the table of mobile with utemized table only.
    3) Do you want to move the table to its own sheet, or copy it to its own sheet leaving the original on the Data sheet? copy each table to new sheet with mobile number as name of the sheet

    I hope that i answered your questions ....
    Kindly check the attached file

    Thanks again for your help

  4. #4
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: VBA copying a range based on contents of a cell

    Here is a way, I hope it woks for you

    Please Login or Register  to view this content.
    Elio Fernandes

  5. #5
    Registered User
    Join Date
    06-12-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: VBA copying a range based on contents of a cell

    Thanks a lot... the code works fine....

    what should i do to save each new sheet as a xls file.

+ 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