ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to return mulitple values based on the contents of another cel (https://www.excelbanter.com/excel-programming/407413-how-return-mulitple-values-based-contents-another-cel.html)

sherlockgr

How to return mulitple values based on the contents of another cel
 
For example cell A1 could contain values of 1 through 50.
If the Value is 1, 4, 7, 10 I want to return the value of A in cell A2
If the Value is 2, 5, 8, 11 I want to return the value of B in cell A2
If the Value is 3, 6,9, 12 I want to return the value of C in cell A2

Thanks for your help!

Gary''s Student

How to return mulitple values based on the contents of another cel
 
=CHOOSE(A1,"A","B","C","A","B","C","A","B","C","A" ,"B","C")

--
Gary''s Student - gsnu200772

Peter T

How to return mulitple values based on the contents of another cel
 
=CHAR(MOD(A1-1,3)+65)

or if you want to validate between 1-50
=IF(AND(A1=1,A1<=50),CHAR(MOD(A1-1,3)+65),"x")

Regards,
Peter T

"sherlockgr" wrote in message
...
For example cell A1 could contain values of 1 through 50.
If the Value is 1, 4, 7, 10 I want to return the value of A in cell A2
If the Value is 2, 5, 8, 11 I want to return the value of B in cell A2
If the Value is 3, 6,9, 12 I want to return the value of C in cell A2

Thanks for your help!





All times are GMT +1. The time now is 10:28 PM.

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