ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional if statement (https://www.excelbanter.com/excel-worksheet-functions/6069-conditional-if-statement.html)

Matt Stanley

Conditional if statement
 
I have a spreadsheet that needs to calculate the annual cost of a service
based on whether the metric is weekly or monthly. For example, one column
has a flat rate; the next column has a pulldown list with the options
"Weekly" or "Monthly;" the last column is for annual cost. This last column
should check to see if the value of the second column is "Weekly" or
"Monthly" and calculate the annual cost accordingly... If it's weekly, then
the last column should multiply the first column by 52, but if it's monthly,
then the last column should multiple the first column by 12.

How do I do this???

TIA,
Stan



Biff

Hi!

Here's one way:

=IF(B1="","",IF(B1="Weekly",A1*52,A1*12))

Assume that the dropdown is in column B and the value to
multiply is in column A.

Biff

-----Original Message-----
I have a spreadsheet that needs to calculate the annual

cost of a service
based on whether the metric is weekly or monthly. For

example, one column
has a flat rate; the next column has a pulldown list with

the options
"Weekly" or "Monthly;" the last column is for annual

cost. This last column
should check to see if the value of the second column

is "Weekly" or
"Monthly" and calculate the annual cost accordingly... If

it's weekly, then
the last column should multiply the first column by 52,

but if it's monthly,
then the last column should multiple the first column by

12.

How do I do this???

TIA,
Stan


.


Matt Stanley

Thanks!

"Biff" wrote in message
...
Hi!

Here's one way:

=IF(B1="","",IF(B1="Weekly",A1*52,A1*12))

Assume that the dropdown is in column B and the value to
multiply is in column A.

Biff

-----Original Message-----
I have a spreadsheet that needs to calculate the annual

cost of a service
based on whether the metric is weekly or monthly. For

example, one column
has a flat rate; the next column has a pulldown list with

the options
"Weekly" or "Monthly;" the last column is for annual

cost. This last column
should check to see if the value of the second column

is "Weekly" or
"Monthly" and calculate the annual cost accordingly... If

it's weekly, then
the last column should multiply the first column by 52,

but if it's monthly,
then the last column should multiple the first column by

12.

How do I do this???

TIA,
Stan


.





All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com