+ Reply to Thread
Results 1 to 9 of 9

Sum from different sheet values

  1. #1
    Registered User
    Join Date
    05-20-2024
    Location
    UK
    MS-Off Ver
    356 Enterprise
    Posts
    3

    Sum from different sheet values

    I need some advice on setting up the below please.

    On Sheet 1, I have a list of items which can be chosen from a Data Validation List in Sheet 2

    Each item in the list on Sheet 2 has a value.

    I’d like to know how I can get the column in Sheet 1 to sum the total value of the chosen items in the list according to their values in the column next to them in Sheet 2.

    In the example attached, the 4 items selected have a total of 6.

    What formula or functions can I use to set this up?
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by aod_; 05-20-2024 at 11:18 AM. Reason: Uploaded example file

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,106

    Re: Sum from different sheet values

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,106

    Re: Sum from different sheet values

    Try this:

    =SUM(BYROW(A1:A4,LAMBDA(r,XLOOKUP(r,Sheet2!A2:A4,Sheet2!B2:B4))))

  4. #4
    Registered User
    Join Date
    05-20-2024
    Location
    UK
    MS-Off Ver
    356 Enterprise
    Posts
    3

    Re: Sum from different sheet values

    Many thanks, I'll try that, but I have uploaded a sample file if it helps.
    Last edited by AliGW; 05-20-2024 at 11:19 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  5. #5
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,106

    Re: Sum from different sheet values

    Try it first, please - let me know.

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,106

    Re: Sum from different sheet values

    Adapted for your sample sheet, which is different:

    =SUM(BYROW(A2:A6,LAMBDA(r,XLOOKUP(r,Sheet2!A2:A8,Sheet2!B2:B8))))

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-20-2024
    Location
    UK
    MS-Off Ver
    356 Enterprise
    Posts
    3

    Re: Sum from different sheet values

    Quote Originally Posted by AliGW View Post
    Try it first, please - let me know.
    Yup looks like it works, many thanks

    I added a bit more info to it as suggested by the instructions, but again thank you, I will check the attachment. I should be able to amend the ranges as I add more items, unless there's a better way to do this, but this works for now.
    Last edited by AliGW; 05-20-2024 at 11:32 AM.

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,106

    Re: Sum from different sheet values

    Pleae don't quote unnecessarily - it's just clutter.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,597

    Re: Sum from different sheet values

    Cell A7 formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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] Make a sheet row values as dropdown list values in another sheet in VBA
    By Saritha123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2021, 07:05 AM
  2. Auto pasting values from a reference sheet when values entered in a separate sheet.
    By jorricha in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-04-2018, 04:37 PM
  3. [SOLVED] Lookup values from sheet 2 with sheet 1 and copy found values in cell b of sheet 1
    By spa3212 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-21-2016, 03:28 AM
  4. Replies: 4
    Last Post: 06-03-2009, 04:59 PM
  5. Replies: 1
    Last Post: 10-05-2005, 08:05 AM
  6. Replies: 1
    Last Post: 10-05-2005, 08:05 AM
  7. Replies: 1
    Last Post: 10-05-2005, 06:05 AM

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