+ Reply to Thread
Results 1 to 14 of 14

Copy cells from one sheet to another

Hybrid View

macro_beta Copy cells from one sheet to... 05-11-2010, 10:55 AM
StephenR re: Copy cells from one sheet... 05-11-2010, 10:59 AM
macro_beta re: Copy cells from one sheet... 05-11-2010, 11:08 AM
StephenR re: Copy cells from one sheet... 05-11-2010, 11:11 AM
macro_beta re: Copy cells from one sheet... 05-11-2010, 11:18 AM
StephenR re: Copy cells from one sheet... 05-11-2010, 11:24 AM
macro_beta re: Copy cells from one sheet... 05-11-2010, 11:31 AM
StephenR re: Copy cells from one sheet... 05-11-2010, 11:51 AM
macro_beta re: Copy cells from one sheet... 05-11-2010, 12:14 PM
macro_beta Re: Copy cells from one sheet... 05-12-2010, 09:48 AM
StephenR Re: Copy cells from one sheet... 05-13-2010, 01:56 PM
macro_beta Re: Copy cells from one sheet... 05-13-2010, 04:23 PM
snb Re: Copy cells from one sheet... 05-13-2010, 05:51 PM
StephenR Re: Copy cells from one sheet... 05-14-2010, 06:49 AM
  1. #1
    Registered User
    Join Date
    05-11-2010
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    14

    Copy cells from one sheet to another

    I'm looking for a macro that can help me copy a row from a sheet to another one. Simple as it might sound, is a little bit more complicated.

    I have two sheets one has the raw data and the second one has report format.I will like to run a macro in the sheet looking for cells with a particular customers name and them copy those rows into the second sheet that has fewer columns as it a more easy to follow report.

    So in the first sheet i have 12 columns headers and on the second i only have 6.

    I'm attaching a sample format, if anyone can help will be great.

    I've tried many macros and formulas unfortunately haven't found the solution.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    re: Copy cells from one sheet to another

    Couldn't you just use a simple formula, e.g. for Financial Element (in D2)

    =Data!L4

    etc? Why not just hide columns rather than duplicate your data?

  3. #3
    Registered User
    Join Date
    05-11-2010
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    14

    re: Copy cells from one sheet to another

    Quote Originally Posted by StephenR View Post
    Couldn't you just use a simple formula, e.g. for Financial Element (in D2)

    =Data!L4

    etc? Why not just hide columns rather than duplicate your data?
    yes that will be the easy method, but the real raw data file is over 6000 rows and more than 12 customers, i want to divide each customer into one sheet hence the macro.

    Is an easier way to report each customer aging time and category which is the objective of the file. the aging time and category are displayed vertically in the raw data but i want to transposed that to be horizontally on the report sheet.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    re: Copy cells from one sheet to another

    To remove doubt can you update your attachment because it doesn't seem to tally with your latest statement about one sheet for each customer.

    Have you considered pivot tables?

  5. #5
    Registered User
    Join Date
    05-11-2010
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    14

    re: Copy cells from one sheet to another

    Quote Originally Posted by StephenR View Post
    To remove doubt can you update your attachment because it doesn't seem to tally with your latest statement about one sheet for each customer.

    Have you considered pivot tables?
    Updated.

    Yes I've tried with pivot, but not a big fan of using pivots as it narrows down the customization ability. For example columns colors etc...

    This file will be sent to users that need to view their customer and take action based on aging time.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    re: Copy cells from one sheet to another

    I've got some pretty much off the shelf code which could do that. Are the last 6 columns are based on S and U?

  7. #7
    Registered User
    Join Date
    05-11-2010
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    14

    re: Copy cells from one sheet to another

    Quote Originally Posted by StephenR View Post
    I've got some pretty much off the shelf code which could do that. Are the last 6 columns are based on S and U?
    Yes they are, that was the other problem i found there's 6 category of aging.

    0-30
    31-60
    61-90
    90-120
    121-360
    >360

    i have that category shown on the column U and the amount on column S, i want to have those cells shown horizontally instead of vertically. like on the report sheets. is that possible?

  8. #8
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    re: Copy cells from one sheet to another

    All the age cat entries in your example are "6.>361" which is not obvious. So what are the entries for the other categories? Actually would be helpful if the Col U entries could be labelled same as headings in report sheet. EDIT: a rather more basic question which has only just occurred: what are you proposing to show in each row of the report sheets? A breakdown of by department? Perhaps you could add some sample results to your file.
    Last edited by StephenR; 05-11-2010 at 11:58 AM.

  9. #9
    Registered User
    Join Date
    05-11-2010
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    14

    re: Copy cells from one sheet to another

    Quote Originally Posted by StephenR View Post
    All the age cat entries in your example are "6.>361" which is not obvious. So what are the entries for the other categories? Actually would be helpful if the Col U entries could be labelled same as headings in report sheet. EDIT: a rather more basic question which has only just occurred: what are you proposing to show in each row of the report sheets? A breakdown of by department? Perhaps you could add some sample results to your file.
    i changed the label and also put some other entries on col U so you can see the categories.

    Yes what i want is that on each sheet to show the customer report (google for example) each row is a PO number showing the amount and category the PO is at. Amount in USD Dollars and the customer name (which is different on each country but is the same google)

    i've attached an example on the sheet google showing the end result.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-11-2010
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Copy cells from one sheet to another

    anyone has an idea what i could do?

  11. #11
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Copy cells from one sheet to another

    Are you still looking for a solution to this? Slipped under the radar.

  12. #12
    Registered User
    Join Date
    05-11-2010
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Copy cells from one sheet to another

    Quote Originally Posted by StephenR View Post
    Are you still looking for a solution to this? Slipped under the radar.
    yes, I'm looking for it, I've tried many different options but haven't had any luck yet.

  13. #13
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Copy cells from one sheet to another

    This should do the main part of the trick:
    Sub tst()
      With Sheets("Data").UsedRange
         .AutoFilter 3, "*Google*"
         Sheets("Data").Range("A:A,E:E,C:C,L:L,F:F,M:M,U:U").SpecialCells(xlCellTypeVisible).Copy Sheets("Google").Cells(1, 1)
         .AutoFilter
        End With
    End Sub

  14. #14
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Copy cells from one sheet to another

    Another question: will all the entries for any given PO no. fit in the same age category as in your example, or could they be split across several?

    EDIT: this would be so much easier if you just used pivot tables!
    Last edited by StephenR; 05-14-2010 at 07:20 AM.

+ 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