![]() |
Macro that Finds the First Value in a range using a Combobox (drop down menu)
I have a long list of countires and some info attached to them in a
spread sheet. I want to add a drop-down menu at the top of the spread sheet that will go to the first cell in the column that contains that text. E.G. If I choose Peru from the menu I want it to go to that exact cell in the spread sheet so scrolling isn't necessary. Does anyone know any VBA code that I can assign to this control?- It's Forms not ActiveX. Thanks. Matt |
Macro that Finds the First Value in a range using a Combobox (drop
If you have a LINK cell e.g. B1, then this will scroll to the cell in Column A.
This assumes data (your country list) starts in row 1. Sub DropDown2_Change() ActiveWindow.ScrollRow = Range("B1") End Sub HTH " wrote: I have a long list of countires and some info attached to them in a spread sheet. I want to add a drop-down menu at the top of the spread sheet that will go to the first cell in the column that contains that text. E.G. If I choose Peru from the menu I want it to go to that exact cell in the spread sheet so scrolling isn't necessary. Does anyone know any VBA code that I can assign to this control?- It's Forms not ActiveX. Thanks. Matt |
Macro that Finds the First Value in a range using a Combobox (drop
On Jul 12, 4:52 am, Toppers wrote:
If you have a LINK cell e.g. B1, then this will scroll to the cell in Column A. This assumes data (your country list) starts in row 1. Sub DropDown2_Change() ActiveWindow.ScrollRow = Range("B1") End Sub HTH " wrote: I have a long list of countires and some info attached to them in a spread sheet. I want to add a drop-down menu at the top of the spread sheet that will go to the first cell in the column that contains that text. E.G. If I choose Peru from the menu I want it to go to that exact cell in the spread sheet so scrolling isn't necessary. Does anyone know any VBA code that I can assign to this control?- It's Forms not ActiveX. Thanks. Matt- Hide quoted text - - Show quoted text - I failed to mention that the countries are not in consecutive order. There are a few rows between each country. Is there a formula that will match the text chosen from the drop down menu to the text in the spread sheet? |
All times are GMT +1. The time now is 08:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com