+ Reply to Thread
Results 1 to 5 of 5

Check cell and sum differents worksheets

  1. #1
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2003
    Posts
    3

    Check cell and sum differents worksheets

    Hello everybody!

    So, I need a little help here, as I really don't know how can I do this.

    What I have is a excel file with 32 worksheets.
    First worksheet is named "calc", the rest are 1,2,3...31 (all days of a month)

    What I need the calc to do is this:

    ------
    Fom day:
    To day:

    E:
    S:
    B:
    ------

    So "from day" is the day you want to start de sum, and "to day" is the day you want it to end.
    E: is the sum of the values on cells E4 from the day "from day" to the day "to day"
    S: is the sum of the values os cells E5 from the day "from day" to the day "to day"
    B: is E - S

    It might be confusing to understand, and I don't know how to properly explain it, so let me show you guys some examples.

    ----- (what is highlited is what will be done automatically)
    Fom day: 01
    To day: 04

    E: '01'!E4+'02'!E4+'03'!E4+'04'!E4
    S: '01'!E5+'02'!E5+'03'!E5+'04'!E4
    B: E-S
    ------

    ----- (what is highlited is what will be done automatically)
    Fom day: 05
    To day: 07

    E: '05'!E4+'06'!E4+'07'!E4
    S: '05'!E5+'06'!E5+'07'!E5
    B: E-S
    ------

    Hope you guys can understand what I'm trying to do!

    Thanks already a lot for the help!

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Check cell and sum differents worksheets

    It's a bit of a mess but:
    if B1 is your start sheet and B2 is your end sheet:
    =SUMPRODUCT(SUMIF(INDIRECT("'"&TEXT(ROW(INDIRECT(B1&":"&B2)),"00")&"'!E4"),"<>"))
    as an array formula (confirm with ctrl+shift+enter), might work.

  3. #3
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Check cell and sum differents worksheets

    Quote Originally Posted by ragulduy View Post
    It's a bit of a mess but:
    if B1 is your start sheet and B2 is your end sheet:
    =SUMPRODUCT(SUMIF(INDIRECT("'"&TEXT(ROW(INDIRECT(B1&":"&B2)),"00")&"'!E4"),"<>"))
    as an array formula (confirm with ctrl+shift+enter), might work.
    My excel is returning and error... (ROW(INDIRECT(B1&":"&B2)),"00")

    What am I doing wrong? I don't get that 00..

    Yes, I'm using ctrl shift enter
    Last edited by Salivan; 05-13-2014 at 12:06 PM.

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Check cell and sum differents worksheets

    It is to change 1 into 01 and 31 into 31 to make sure the sheet names are correct, It seemed ok when I tested it, I've uploaded an example.

    I realised as well that it seems to work as a non-array/regular formula as well.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Check cell and sum differents worksheets

    Quote Originally Posted by ragulduy View Post
    It is to change 1 into 01 and 31 into 31 to make sure the sheet names are correct, It seemed ok when I tested it, I've uploaded an example.

    I realised as well that it seems to work as a non-array/regular formula as well.
    Working like a charm! Thanks a lot!

    The problem was that my excel is in portuguese, and I translated the formula INDIRECT as INDIRECTO when it actually is INDIRETO

    Again, thanks a lot for the help!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Check if cell is not empty and checks if worksheets already exists
    By rskay14 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-20-2014, 02:40 AM
  2. [SOLVED] [Macro] Compare two columns, if cells differents, copy and delete cell
    By Skuz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-17-2013, 06:08 PM
  3. VBA - Check Cell Value (in multiple worksheets) - Then Run Macro On Sheet
    By jonedelman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2012, 03:36 PM
  4. Divide cell to worksheets then add for check n balance
    By mpagan1013 in forum Excel General
    Replies: 1
    Last Post: 11-01-2011, 12:40 PM
  5. Join differents words in cells seperated by ;
    By corvito in forum Excel General
    Replies: 8
    Last Post: 04-08-2007, 11:02 PM

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