Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 11th, 2011, 09:57 PM
Authorized User
 
Join Date: May 2009
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combo box to extract cell address

Any knowledge of combo boxes I have is from Access, which seems a bit different that in Excel.

What I need to do:
In short, copy a selected row of data into a different row. The destination row will always be the same, but the originating row will vary by the selection in the drop down box. This destination row is the source data for analyses done in a complex set of calculations in another part of the worksheet that is used for a report. (All of the calculations are easy, but there are a lot of them).

Using a standard location for the data being analyzed makes the coding of the formulas/calculations easier and it allows the viewer to see the raw data easily when looking at the analysis. I do not want to change that part of the process.

And I have to admit, I don't yet know what the linking cell is in the properties of a combo box, but I should be able to find that easily.

In the first draft of this worksheet, I had the user enter a row number into a cell, the row of the data they want to see in the analysis section. Then, using that row number, a macro would copy the row selected and paste it into the destination row. It worked quite well.

Now they want to use a drop down box (combo box actually) to make their selection and choose the name of the institution being analyzed.

I suppose I could just let them do that and then use a Lookup function to determine the row to copy. That seems like it might be a bit complicated to do in a macro. First find the name they selected and make the cell active, then capture the row number in a macro, and finally use the code I have now in place to copy that row of data to the destination row.

Instead, is there a way to let them select the name they want, show that name in the selection box, but return the row number or cell address in an adjacent cell?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate a text box from a combo box value dnf999 Access VBA 7 February 6th, 2012 02:24 PM
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.