ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Fill Cell by filtering item from large list (https://www.excelbanter.com/excel-programming/345535-fill-cell-filtering-item-large-list.html)

dthames

Fill Cell by filtering item from large list
 

I know more VBA than Excel, so I need help on a high level to know the
methods you might use.

Similar to the Lookup function I need to fill in a cell from another
workbook or worksheet. I need to be able to do something like: open a
form, select some filtering options (categories), then select an item
from a narrowed list. The selected value would populate the cell.

One column of cells would be populated one cell at a time, based on the
user decisions. A simple example would be to select a city from any
where in the world. You might want to select the continent, select the
reagion/nation, state/area, then the city. I think I can manage a good
part of it in VBA but how to connect it to the cell in Excel is what I
am lost.

Thanks,
Dan


--
dthames
------------------------------------------------------------------------
dthames's Profile: http://www.excelforum.com/member.php...o&userid=28793
View this thread: http://www.excelforum.com/showthread...hreadid=484821


Tom Ogilvy

Fill Cell by filtering item from large list
 
Assuming form is a userform:

Private Sub Combobox6_click()
' code that places the value in textbox2 based on values
' in 6 comboboxes
set rng = Worksheets("Sheet2").Cells(rows.count,4).End(xlup) .offset(1,0)
rng.value = Textbox2.Value
End sub

--
Regards,
Tom Ogilvy



"dthames" wrote in
message ...

I know more VBA than Excel, so I need help on a high level to know the
methods you might use.

Similar to the Lookup function I need to fill in a cell from another
workbook or worksheet. I need to be able to do something like: open a
form, select some filtering options (categories), then select an item
from a narrowed list. The selected value would populate the cell.

One column of cells would be populated one cell at a time, based on the
user decisions. A simple example would be to select a city from any
where in the world. You might want to select the continent, select the
reagion/nation, state/area, then the city. I think I can manage a good
part of it in VBA but how to connect it to the cell in Excel is what I
am lost.

Thanks,
Dan


--
dthames
------------------------------------------------------------------------
dthames's Profile:

http://www.excelforum.com/member.php...o&userid=28793
View this thread: http://www.excelforum.com/showthread...hreadid=484821




dthames[_2_]

Fill Cell by filtering item from large list
 

Tom,

Thanks for the suggestion.

I did a quick test and typed something in a text box. I pressed a
command button with your code behind it. The text was added into the
column at the end.

I will just need to carry the current row value into the routine when
it is called and then move the row pointer down for each sequential
row. That would provide a way to populate that column from top to
bottom of an existing sheet.

(correct me if I am missing something)

Thanks again.

Dan


--
dthames
------------------------------------------------------------------------
dthames's Profile: http://www.excelforum.com/member.php...o&userid=28793
View this thread: http://www.excelforum.com/showthread...hreadid=484821


Tom Ogilvy

Fill Cell by filtering item from large list
 
Yes, the code fills in the value at the end of the data in the column (my
interpretation of what you wanted). I am not sure what you are proposing
that is different from that or why that doesn't fulfill your requirement, so
I can't tell if you missing something or not.

--
Regards,
Tom Ogilvy

"dthames" wrote in
message ...

Tom,

Thanks for the suggestion.

I did a quick test and typed something in a text box. I pressed a
command button with your code behind it. The text was added into the
column at the end.

I will just need to carry the current row value into the routine when
it is called and then move the row pointer down for each sequential
row. That would provide a way to populate that column from top to
bottom of an existing sheet.

(correct me if I am missing something)

Thanks again.

Dan


--
dthames
------------------------------------------------------------------------
dthames's Profile:

http://www.excelforum.com/member.php...o&userid=28793
View this thread: http://www.excelforum.com/showthread...hreadid=484821




dthames[_3_]

Fill Cell by filtering item from large list
 

Tom,

The normal condition would be the user would have many rows of data and
a specific column would be blank and need to be filled in. Or later one
of the values would need to be changed. The user would select row on
that specific column and start the program. The program would populate
that cell and move the next row to repeat the function.

This is the same as what you suggested but just working from the
current cell rather than appending to the bottom.

Dan


--
dthames
------------------------------------------------------------------------
dthames's Profile: http://www.excelforum.com/member.php...o&userid=28793
View this thread: http://www.excelforum.com/showthread...hreadid=484821



All times are GMT +1. The time now is 11:28 AM.

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