+ Reply to Thread
Results 1 to 9 of 9

copy

  1. #1
    Khalil Handal
    Guest

    copy

    Hi,
    I have 12 sheets for 12 months. I have another sheet for summary from the 12
    sheets. From each of the 12 sheets i need to copy 15 cells.
    Is there a way to write the formula once and then pull down instead of
    writing each one manulay using the name of the sheet from which I copy.

    Khalil






  2. #2
    Max
    Guest

    Re: copy

    One way is to use INDIRECT()

    Assume the monthly sheets are identically structured
    and named: Jan, Feb, Mar ...

    Assume the 15 cells to be extracted from each monthly sheet
    are, for e.g.: cell B2, C3, D4, E7 ... etc

    In "Summary"
    ------------------
    List across in B1:M1, the 12 monthly sheets: Jan, Feb, Mar ...
    List down in A2:A16, the 15 target cell refs: B2, C3, D4, E7 ... etc

    Put in B2: =INDIRECT("'"&B$1&"'!"&$A2)

    Copy B2 across to M2, fill down to M16
    (or copy down and fill across to populate the grid)

    The above will extract what's in the 15 cell references
    from each of the 12 monthly sheets

    And for a cleaner look, we could also suppress extraneous zeros
    from showing in the sheet via:
    Click Tools > Options > View tab > Uncheck "Zero Values" > OK
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Khalil Handal" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I have 12 sheets for 12 months. I have another sheet for summary from the

    12
    > sheets. From each of the 12 sheets i need to copy 15 cells.
    > Is there a way to write the formula once and then pull down instead of
    > writing each one manulay using the name of the sheet from which I copy.
    >
    > Khalil




  3. #3
    Khalil Handal
    Guest

    Re: copy

    Hi,
    I tried what you sent to me but i have an error: #REF!
    I don't know what went wrong or if i was not clear!

    To be more specific:
    12 sheets have the anmes of twelve months.
    sheet 13 has the name of "summary"
    in cell c5 of sheet13 for example I need to copy from sheet1(january) the
    range f10:k10
    in cell c6 of sheet13 I need to copy from sheet2
    (february) the range f10:k10
    and so on

    thank you.





  4. #4
    Max
    Guest

    Re: copy

    > I tried what you sent to me but i have an error: #REF!

    Your *actual* sheetnames probably did not match
    what was entered in B1:M1, that's why <g>

    Ok, since you've given more specifics
    on your layout and reqts, we could try this instead:

    Assume you have the 12 monthly sheetnames entered in A5:A16,
    viz.: January, February, March ... December

    Put in C5:
    =OFFSET(INDIRECT("'"&$A5&"'!F10"),,COLUMNS($A$1:A1)-1)
    Copy C5 across to H5 (i.e. across the same range size as F10:K10),
    then fill down to H16

    C5:H5 will return what's in F10:K10 in "January"
    C6:H6 will return what's in F10:K10 in "February"
    and so on ..

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Khalil Handal" <[email protected]> wrote in message
    news:#[email protected]...
    > Hi,
    > I tried what you sent to me but i have an error: #REF!
    > I don't know what went wrong or if i was not clear!
    >
    > To be more specific:
    > 12 sheets have the anmes of twelve months.
    > sheet 13 has the name of "summary"
    > in cell c5 of sheet13 for example I need to copy from sheet1(january) the
    > range f10:k10
    > in cell c6 of sheet13 I need to copy from sheet2
    > (february) the range f10:k10
    > and so on
    >
    > thank you.
    >
    >
    >
    >




  5. #5
    Khalil Handal
    Guest

    Re: copy

    thanks a lot.
    Khalil




  6. #6
    Max
    Guest

    Re: copy

    You're welcome !
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Khalil Handal" <[email protected]> wrote in message
    news:#[email protected]...
    > thanks a lot.
    > Khalil
    >
    >
    >




  7. #7
    Khalil Handal
    Guest

    Re: copy

    Hi Max,
    it is me again
    What if the sheet name is "January 2005" and need to have only the first
    word "january" without the "2005"
    what changes should i make to your formula?

    =OFFSET(INDIRECT("'"&$A6&"'!F10");;COLUMNS($A$1:A2)-1)

    Khalil




  8. #8
    Max
    Guest

    Re: copy

    With A5:A16 containing: January, February, March ... December
    (no change)

    Put this slightly revised formula in C5 (the top left starting cell):
    =OFFSET(INDIRECT("'"&$A5&" 2005"&"'!F10"),,COLUMNS($A$1:A1)-1)

    Copy C5 across to H5, fill down to H16 as before

    The change made was to concat " 2005" (note the preceding space within the
    quotes) with what's in A5, A6 ... A16 to match the *actual* sheetnames:
    January 2005, February 2005, etc
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Khalil Handal" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Max,
    > it is me again
    > What if the sheet name is "January 2005" and need to have only the first
    > word "january" without the "2005"
    > what changes should i make to your formula?
    >
    > =OFFSET(INDIRECT("'"&$A6&"'!F10");;COLUMNS($A$1:A2)-1)
    >
    > Khalil
    >
    >
    >




  9. #9
    Bob Phillips
    Guest

    Re: copy

    Maybe

    =OFFSET(INDIRECT("'"&$A6&" "&YEAR(TODAY())&"'!F10");;COLUMNS($A$1:A2)-1)


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Khalil Handal" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Max,
    > it is me again
    > What if the sheet name is "January 2005" and need to have only the first
    > word "january" without the "2005"
    > what changes should i make to your formula?
    >
    > =OFFSET(INDIRECT("'"&$A6&"'!F10");;COLUMNS($A$1:A2)-1)
    >
    > Khalil
    >
    >
    >




+ 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