RookieExcel22
New Member
- Joined
- Aug 11, 2023
- Messages
- 12
- Office Version
- 365
- Platform
- Windows
Suppose I have table 1 that is the below
Then I have table two:
Is there a formula or macro that I can use in the total column in table two that will sum the values in the value column from table 1 using the values in sumnumber column in table 2?
My only thought is some macro that creates a bunch of columns to then use the text to columns function then sumif against each column, remove formula and then delete the columns. The problem is, the "SumNumber" column is dynamic and may not always be two values. It could be one, it could be 10, etc.
Thank you!
Number | Value |
1234 | 10 |
5678 | 20 |
9012 | 35 |
3456 | 40 |
Then I have table two:
Number | SumNumber | Total |
A | 1234,3456 | 50 |
B | 5678,9012 | 55 |
Is there a formula or macro that I can use in the total column in table two that will sum the values in the value column from table 1 using the values in sumnumber column in table 2?
My only thought is some macro that creates a bunch of columns to then use the text to columns function then sumif against each column, remove formula and then delete the columns. The problem is, the "SumNumber" column is dynamic and may not always be two values. It could be one, it could be 10, etc.
Thank you!