+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    01-07-2010
    Location
    office
    MS-Off Ver
    Excel 2003
    Posts
    3

    Fetching data from another worksheet

    Hi

    I m creating a worksheet where I have to bring the data from another worksheet and add for 7 cells.

    e.g. worksheet w1 cell a1 has =sum(W2!a1..a7)
    a2 should have =sum(W2!a8..a14)
    a3 should have =sum(W2!a15..a21) and so on

    when I write the formula in A1 and copy or extend it to A2 its taking A2 as starting cell instead of A8.

    Help please! how do I copy the formula so it will take =sum(w2!a1..a7) in a1 and =sum(w2!a8..a14) in a2 and =sum(w2!a15..a21) in a3 and so on.
    Last edited by baapji; 01-07-2010 at 05:30 PM.

  2. #2
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,114

    Re: Fetching data from another worksheet

    Try

    =SUM(INDEX(W2!$A$1:$A$100,1+((ROW(W2!A1)-1)*7)):INDEX(W2!$A$1:$A$100,7+((ROW(W2!A1)-1)*7)))

    adjust the 100 to match the bottom of your entire range...
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    5,823

    Re: Fetching data from another worksheet

    Hi,

    In A1 and copied down.

    Code:
    =SUM(INDIRECT("'W2'!A"&ROW()*7-6&":A"&ROW()*7))
    Rgds
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  4. #4
    Registered User
    Join Date
    01-07-2010
    Location
    office
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Fetching data from another worksheet

    Quote Originally Posted by NBVC View Post
    Try

    =SUM(INDEX(W2!$A$1:$A$100,1+((ROW(W2!A1)-1)*7)):INDEX(W2!$A$1:$A$100,7+((ROW(W2!A1)-1)*7)))

    adjust the 100 to match the bottom of your entire range...

    this might work as I have changed the W2 with the real worksheet name and A1 as B152 and A100 as IV152 so it COLUMN instead of rows.

    Summing up first 7 cells of 152nd row in the first cell in summary tab and 2nd cell will be next 7 cell's sum.

    I modified the formula as =SUM(INDEX(Art!$B$152:$IV$152,1+((COLUMN(Art!B152)-1)*7)):INDEX(Art!$B$152:$IV$152,7+((COLUMN(Art!B152)-1)*7)))

    gives nothing and I HAVE the data in Art sheet
    Last edited by baapji; 01-07-2010 at 05:31 PM.

  5. #5
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,114

    Re: Fetching data from another worksheet

    Try:

    =SUM(INDEX(Art!$B$152:$IV$152,1+((COLUMN(Art!B152)-COLUMN(Art!$B2))*7)):INDEX(Art!$B$152:$IV$152,7+((COLUMN(Art!B152)-COLUMN(Art!$B2))*7)))

    or

    =SUM(INDEX(Art!$B$152:$IV$152,1+((COLUMNS(Art!$B152:Art!B152)-1)*7)):INDEX(Art!$B$152:$IV$152,7+((COLUMNS(Art!$B152:Art!B152)-1)*7)))
    Last edited by NBVC; 01-07-2010 at 05:22 PM.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  6. #6
    Registered User
    Join Date
    01-07-2010
    Location
    office
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Fetching data from another worksheet

    Quote Originally Posted by NBVC View Post
    Try:

    =SUM(INDEX(Art!$B$152:$IV$152,1+((COLUMN(Art!B152)-COLUMN(Art!$B2))*7)):INDEX(Art!$B$152:$IV$152,7+((COLUMN(Art!B152)-COLUMN(Art!$B2))*7)))

    or

    =SUM(INDEX(Art!$B$152:$IV$152,1+((COLUMNS(Art!$B152:Art!B152)-1)*7)):INDEX(Art!$B$152:$IV$152,7+((COLUMNS(Art!$B152:Art!B152)-1)*7)))
    It worked the first one ... didnt try the second one ... Thanks NBVC

    I ll mark it as solved.

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.2.0