ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   about drop down list (https://www.excelbanter.com/excel-discussion-misc-queries/90952-about-drop-down-list.html)

cox

about drop down list
 

I created a drop down list say at a10. The list appears in a18:a20 whose
contents are 4,5,6. So when I click at a10 and choose, I can insert either of
4, 5 or 6 at a10. But what I need is some result computed using a macro say
macro1 using the choice 4 or 5 or 6 (whatever I choose) and the result to be
inserted at a10. How do I do this?

In other words if macro1 computes respectively 12, 34 or 76 using the data
4, 5 or 6. Then when I select 4, 12 should be inserted in a10, if I select 5,
34 will be inserted in a10 etc. I hope I made the problem clear. The data in
the example are arbitrary - the macro computes the result. An obvious related
question is how do I pass the selected data in list to macro1.

paul

about drop down list
 
you dont say what kind of drop down list you have but a forms toolbar
combobox or a control toolbar combobox can link directly to a macro.Otherwise
a data validation list could utilize a worksheet change event to trigger your
macro....is the macro necessary?cant you carry out your calculations on the
sheet itself?
--
paul

remove nospam for email addy!



"cox" wrote:


I created a drop down list say at a10. The list appears in a18:a20 whose
contents are 4,5,6. So when I click at a10 and choose, I can insert either of
4, 5 or 6 at a10. But what I need is some result computed using a macro say
macro1 using the choice 4 or 5 or 6 (whatever I choose) and the result to be
inserted at a10. How do I do this?

In other words if macro1 computes respectively 12, 34 or 76 using the data
4, 5 or 6. Then when I select 4, 12 should be inserted in a10, if I select 5,
34 will be inserted in a10 etc. I hope I made the problem clear. The data in
the example are arbitrary - the macro computes the result. An obvious related
question is how do I pass the selected data in list to macro1.



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

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