Return a formula

babyg

New Member
Joined
Feb 27, 2009
Messages
24
I have a worksheet that contains 4 columns. Column A is a $ amount, Column B is the frequency (ie hourly, weekly, monthly, annually), Column C is the written out version of the formula used to calculate the total, and Column D is the total amount. I am looking for a way to populate Column C based on the data entered. So if the frequency was monthly it would show the vaule of column A times 12, or if annually it would show the value of column A times 1.

Example:

A B C D
$800 Monthly 800 x 12 $9600
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I have a worksheet that contains 4 columns. Column A is a $ amount, Column B is the frequency (ie hourly, weekly, monthly, annually), Column C is the written out version of the formula used to calculate the total, and Column D is the total amount. I am looking for a way to populate Column C based on the data entered. So if the frequency was monthly it would show the vaule of column A times 12, or if annually it would show the value of column A times 1.

Example:

A B C D
$800 Monthly 800 x 12 $9600
If Monthly is x 12 then what are the other multipliers?
 
Upvote 0
Annually is value of column A x 1
Hourly is value of column A x 40 x 52
Weekly is value of column A x 52
 
Upvote 0
Annually is value of column A x 1
Hourly is value of column A x 40 x 52
Weekly is value of column A x 52
Try this...

Book1
ABCD
2800Monthly800 x 129600
310Hourly10 x 40 x 5220800
417Weekly17 x 52884
525Annually25 x 1300
6____
7____
8____
9____
10Annually1__
11Hourly2080__
12Monthly12__
13Weekly52__
Sheet1

This formula entered in D2 and copied down:

=A2*IF(B2="annually",12,IF(B2="hourly",2080,IF(B2="weekly",52,IF(B2="monthly",12))))

Or, you could create a 2 column table as shown and use this formula:

=A2*IF(COUNTIF(A$10:A$13,B2),VLOOKUP(B2,A$10:B$13,2,0))
 
Upvote 0
Is there also a formula that can be used to fill in the contents of column C as shown?
 
Upvote 0
Is there also a formula that can be used to fill in the contents of column C as shown?
If you use the lookup table...

Book1
ABCD
2800Monthly800 x 129600
310Hourly10 x 208020800
417Weekly17 x 52884
525Annually25 x 1300
6____
7____
8____
9____
10Annually1__
11Hourly2080__
12Monthly12__
13Weekly52__
Sheet1

This formula entered in C2 and copied down:

=A2&" x "&VLOOKUP(B2,A$10:B$13,2,0)
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,664
Members
448,976
Latest member
sweeberry

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