Forum

Notifications
Clear all

Should I use vlookup/if function to sum up

2 Posts
2 Users
0 Reactions
69 Views
(@pohs)
Posts: 1
New Member
Topic starter
 

Reference table 

Category             True=1, False=0

A                                 1

B                                 0

C                                 1

D                                 1

E                                 0

F                                  1

G                                 0

 

Question 1

Category             Amount

A                                 60

B                                 90

C                                 10

D                                 80

E                                 60

Total                          X=?

 

Previously my answer is =A+C+D

But they don’t want manual correction if in question 1 Category B is change to category F

Then the answer will be =A+C+D+F

 

Should I use vlookup/if function to sum up to total amount

                                   

 
Posted : 18/09/2020 1:40 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Poh,

I'd probably use SUMPRODUCT but I don't clearly understand your question.

What is it you want to sum, the Amount?

If so, how does F come into the equation? If your answer is A+C+D+F I don't understand what value to give F?

Please explain things again and as always, it's best to provide a workbook rather than type data into the post, which we then have to retype into a workbook.

In your explanation give examples of the expected result(s).  As I said A+C+D+F is ambiguous because F has no value in the information you provided.

What exactly is the relationship between the lookup table and the question?

Why is your initial answer A+C+D?  Because they have True values in your lookup table?

https://www.myonlinetraininghub.com/excel-forum/forum-rules-and-guides/read-this-first

Phil

 
Posted : 18/09/2020 1:50 am
Share: