What is the best way to do it...?

917

New Member
Joined
Apr 5, 2013
Messages
23
Hi all

I've got a workbook that has two tabs:
1. Values
2. Answers​

The 'Values' tab has two columns
A. Criteria
B. Rate - different for each row, max 4 rows (B1 to B4)​

The 'Answers' tab has three columns
A. Help needed
B. How often
C. Cost​

At the moment, it simply uses the sum =A1*B1*Values!B1 (through to C20) to return the cost.

I need to find a way that allows the user to determine on the 'Answers' tab, what rate should be used to perform the sum and return the cost.

Is an IF statement the way to go (looking up say Yes in a cell and then calculating) or am I best using VBA somehow?

I was trying to figure it out using four cells, where the user enters a Yes in one of them, with the sum for 'Answers' column C as:

=IF(E1="Yes",A1*B1*Values!A1),IF(E2="Yes",A1*B1*Values!A2),(E3="Yes",A1*B1*Values!A3),(E1="Yes",A1*B1*Values!A4)

But I think that's just poor form lol.

Any pointers or code gratefully received.
Many thanks
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

cyrilbrd

Well-known Member
Joined
Feb 2, 2012
Messages
4,071
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hi,
What happens if the answer is 'no'?
What is the condition for the criteria?
 

917

New Member
Joined
Apr 5, 2013
Messages
23
Hi cyrilbrd

Thanks for the reply, I ended up finding a whole new way.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,318
Messages
5,600,921
Members
414,416
Latest member
Nobu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top