+ Reply to Thread
Results 1 to 12 of 12

how to copy a cell formula contain sheet name which have to add up automatically

  1. #1
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    how to copy a cell formula contain sheet name which have to add up automatically

    I'm currently using microsoft excel 2003.
    How do I make a formula that will keep added up after I copy the cell to another cell below.

    For Example :
    I type ='sheet1'!A1 after copy to the cell below it will become :
    ='sheet1'!A1
    ='sheet2'!A1
    ='sheet3'!A1
    and keep adding up the number when I copy it

    until now when I copy, it only add up the A1 to A2, A3, A4 . . .

    the 'Sheet1' is the name of sheet contain information I need to use which located at A1.
    just like I type 100 in A1 of sheet1. type 200 in A1 of sheet2. type 300 in A1 of sheet3.
    Then in another sheet (I name the sheet "Total"),
    in the sheet of Total, I want to show All the value of A1 in all sheet (sheet1, sheet2 and sheet3), which I want them sorted vertical,
    so it will shown
    100 (this is automatically by typing formula ='sheet1'!A1)
    200 (this is automatically by typing formula ='sheet2'!A1)
    300 (this is automatically by typing formula ='sheet3'!A1)

    but it's really tired, if I always have to type manually the ='sheet4'!A1, then after that ='sheet5'!A1, then keep going until sheet100. I have around 100 sheet that need to shown the value of A1

    Then would solve my problem if there are anyway to just copy down the formula, and the sheet number would change automatically when I copy it so no need to type manually.

    I know this is quite confuse. I hope everyone can understand.

    Your help is appreciated
    Thanks in advance
    Last edited by BlastRanger; 09-07-2010 at 06:22 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    try:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    I don't understand that =INDIRECT formula.
    Could you please tell me what is the "'sheet"&ROW()&"'!A$1"

    for instant,
    my sheet will be 2011, 2012, 2013, 2014 all value take from A1 of each sheet.
    So what should I fill the formula for the first row to display A1 of 2011?

  4. #4
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    Sorry
    I think I got the logic for that formula.
    It seems that it will lookup from the row to name the sheet.
    But mine, the row is not the same with the sheet name.
    My sheet name is 2010, 2011, 2012, 2013. Maybe it will meet when the row reach 2010+
    Any idea? CMIIW

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    In which case adapt the ROW reference as necessary

    =INDIRECT("'"&2010+(ROWS(A$1:A1)-1)&"'!A1")
    copied down

  6. #6
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    Hi there,
    After thinking for a while, I got the logic and got the final answer.
    Here is how I solve my problem :
    1. Since my sheet name is "2010", the formula no need to include "sheet".
    2. Since it's starting from 2010, and the row is not the same, I add up the row so it will be match with the name this do the trick
    3. I start the formula from row 10 so in other to achieve 2010 I add up 2000.
    The formula will be :
    =INDIRECT("'"&ROW()+2000&"'!A$1")

    That is it I'm very happy that I solved the problem.
    Oh by the way, Many thanks to ExcelForum.com, may be in future I will meet some problem regarding excel again, this forum is a great place to learn together.

    Special Thanks to protonLeah for opening solution
    Rep++

  7. #7
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    How to only add value in unfiltered cells

    DELETED, should open a new thread instead of reply
    Last edited by BlastRanger; 09-02-2010 at 06:15 AM. Reason: wrong post, should open a new thread instead of reply

  8. #8
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    Hi all,
    another question to increase knowledge about this kind of logic.
    What I have previously is that my sheet start from 2010, then 2011, 2012 . . .
    what about if the sheet is 2010, 2013, 2016
    what should be done in the formula to achieve it?

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    You need to simply adjust the increment from 2010 such that it goes in increments of 3 rather than 1

    =INDIRECT("'"&2010+3*(ROWS(A$1:A1)-1)&"'!A1")
    copied down

  10. #10
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    Marvelous
    Now I got the logic.
    Thank You

  11. #11
    Registered User
    Join Date
    02-10-2014
    Location
    Sadiqabad,pakistan
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    Hi all,
    another question to increase knowledge about this kind of logic.
    What I have previously is that my sheet start from A,B,C,........ . . .
    what about if the sheet is A,B,C,.
    what should be done in the formula to achieve it?

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: how to copy a cell formula contain sheet name which have to add up automatically

    kingirfan,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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