+ Reply to Thread
Results 1 to 14 of 14

What's wrong with this ADDRESS formula? (referencing other sheets)

  1. #1
    Registered User
    Join Date
    03-08-2013
    Location
    Japan
    MS-Off Ver
    Excel for Mac 2011
    Posts
    19

    What's wrong with this ADDRESS formula? (referencing other sheets)

    Please Login or Register  to view this content.
    In sheet one i have a table. Column F is a list of totals (hours worked) and Column H is reserved to write in "PAID" by the user.
    a SUM of column F would total all the hours in the list. What I am trying to accomplish with the above code is to total all the hours worked in the list starting from the row after the user has input "PAID" (the hours before that have essentially already been paid and we need to know what money is owed AFTER that...)

    The code was successful when it was one the same sheet as the table and I removed the sheet references from the above code but when I tried to put it into a different sheet, even after CTRL SHIFT ENTER for an array, it returns a #VALUE!

    Can anyone help me?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    Can you attach a sample workbook?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-08-2013
    Location
    Japan
    MS-Off Ver
    Excel for Mac 2011
    Posts
    19

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    test.xlsx

    Here you are.

    I've made a couple of adjustments compared to the code above... I changed "PAID" to "@" and I realised I was searching in the wrong column for the "@" so I fixed that... but it still has an error. So I'm facing the same issue.
    Last edited by tygrrboi; 05-11-2014 at 04:02 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    What is the expected result where the formula doesn't work and why are the formulae different? I'm struggling to see why a simple SUMIF or COUNTIF would not suffice. Furthermore, why are you not just referencing the cell where the calculation works on the employee sheet from the summary sheet? Why the need to have the formula twice?
    Last edited by AliGW; 05-11-2014 at 04:22 AM.

  5. #5
    Registered User
    Join Date
    03-08-2013
    Location
    Japan
    MS-Off Ver
    Excel for Mac 2011
    Posts
    19

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    I need it to give me a sum of the total hours that come AFTER the @ mark. In the case of the test file it should return "7" because thats the only data after the @ mark. But if you moved the @ mark to cell J4 instead of J5 it should return (Sum of 7 & 2..) 9.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    Yes, I understand. So, on the summary sheet in F8 you need:

    =Sheet1!L2

    Then, when you add extra sheets for different employees, use a drop-down in B1 of the summary sheet to select the correct employee sheet and add the INDIRECT function to F8 to reference B1 for the sheet name. You could easily hide the column on the employee sheet that holds the cell doing the calculation.

  7. #7
    Registered User
    Join Date
    03-08-2013
    Location
    Japan
    MS-Off Ver
    Excel for Mac 2011
    Posts
    19

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    I was hoping to not have to have the formula on each of the employee's sheets and then direct cell reference to a hidden cell... The cell L2 on Sheet1 was just to show that I had no trouble making the formula work locally, but I would ideally like to erase it.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    Why? It's easy to lock sections of the sheet that you don't want to be visible. At least you have a solution. Somebody else may be able to help you to get the formula working from the summary sheet, but if it were me, I really wouldn't bother. What is the issue with having a hidden column on the employee sheet? I can't see from the layout why it would matter.

  9. #9
    Registered User
    Join Date
    03-08-2013
    Location
    Japan
    MS-Off Ver
    Excel for Mac 2011
    Posts
    19

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    I suppose you're right. I just worry about processing speed. Working on a slower computer, calculating that function for several employees each time a cell is edited on the document could slow things down, whereas having it once on the summary page would only calculate one time when I changed the employee name. But I suppose it is trivial in terms of how long it takes to calculate. I guess I will only address the issue if I do realise its performing slowly.

    Thank you for your help

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    You're welcome! Sorry I couldn't solve the problem as you wanted. Leave the thread unsolved and see if anyone else can help - there are very many people here far more experienced than me.

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    I didn't download your file.

    Is this what you're wanting to do:

    Data Range
    A
    B
    C
    D
    1
    ------
    ------
    ------
    ------
    2
    Paid
    3
    374
    3
    Paid
    34
    4
    Paid
    94
    5
    27
    6
    7
    7
    36
    8
    74
    9
    85
    10
    96
    11
    49
    12


    =SUMIF(A2:A11,"<>Paid",B2:B11)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  12. #12
    Registered User
    Join Date
    03-08-2013
    Location
    Japan
    MS-Off Ver
    Excel for Mac 2011
    Posts
    19

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    Kind of. But ideally I wanted to have paid written only in A4 which means anything preceding that has been paid. its a bit of a hassle to write it for every day.

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    Like this...

    Data Range
    A
    B
    C
    D
    1
    ------
    ------
    ------
    ------
    2
    3
    374
    3
    34
    4
    Paid
    94
    5
    27
    6
    7
    7
    36
    8
    74
    9
    85
    10
    96
    11
    49
    12


    =SUM(INDEX(B:B,MATCH("Paid",A:A,0)+1):B100)

  14. #14
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: What's wrong with this ADDRESS formula? (referencing other sheets)

    Try this array formula to see if this helps........

    Please Login or Register  to view this content.
    Last edited by sktneer; 05-12-2014 at 11:18 PM.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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] Why is this referencing the wrong book?
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-28-2014, 04:47 PM
  2. [SOLVED] Issue with Complex formula only when now referencing different sheets. receiving #VALUE!
    By Shrad013 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2013, 03:30 PM
  3. [SOLVED] formula referencing same cells but different sheets
    By jmosso in forum Excel General
    Replies: 2
    Last Post: 02-21-2008, 02:40 PM
  4. formula problem referencing another sheets
    By jfhawk06 in forum Excel General
    Replies: 1
    Last Post: 03-25-2005, 06:09 PM
  5. [SOLVED] Referencing Sheets in a Formula
    By Christopher Anderson in forum Excel General
    Replies: 1
    Last Post: 01-31-2005, 01:06 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