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
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi,
What happens if the answer is 'no'?
What is the condition for the criteria?
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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
Back
Top