ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   return value (https://www.excelbanter.com/excel-discussion-misc-queries/200636-return-value.html)

Zhi Sheng

return value
 
Hi all,

I have a column of data:
column A
0
20
30
40
60
70
90

under following criteria, i want to have column B return certain values:
0 to 30, return 10
40 to 60, return 20
70 to 100, return 30
Is there a formula that can help me to achieve this?

Thank you
--
====================
ask and you shall be answered

Don Guillett

return value
 
Perhaps A simple if
=if(a1=70,30,if(a1=40,20,if(a1=0,10,""))))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Zhi Sheng" wrote in message
...
Hi all,

I have a column of data:
column A
0
20
30
40
60
70
90

under following criteria, i want to have column B return certain values:
0 to 30, return 10
40 to 60, return 20
70 to 100, return 30
Is there a formula that can help me to achieve this?

Thank you
--
====================
ask and you shall be answered



Rick Rothstein \(MVP - VB\)[_1215_]

return value
 
Try this formula...

=IF(A1<=30,10,IF(A1<=60,20,30))

Rick


"Zhi Sheng" wrote in message
...
Hi all,

I have a column of data:
column A
0
20
30
40
60
70
90

under following criteria, i want to have column B return certain values:
0 to 30, return 10
40 to 60, return 20
70 to 100, return 30
Is there a formula that can help me to achieve this?

Thank you
--
====================
ask and you shall be answered




All times are GMT +1. The time now is 07:11 PM.

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