Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pulling data into textbox from spreadsheet
I have a multipage userform that has several drop down boxes that the user
needs to populate (name, month etc..) from that I have text boxes that I want to populate from another spreadsheet located in the same file. I need to use an If-then because I want it too look until it finds a match to the month and then bring in column 3. I have the textbox set to refresh on _chg action of the dropdown and it is bringing in the first row but will not find the match. The code is included. Sub Populate04selldays() Dim Row As Integer, i As Long, j As Long Set selling = ThisWorkbook.Sheets("Selling") TopicCount = Application.WorksheetFunction.CountA(selling.Range ("A:A")) For Row = 1 To TopicCount If selling.Cells(Row, 1) = cbmonth.Value Then tb04selldays.Value = selling.Cells(Row, 3).Value End If Next Row CurrentTopic = 1 End Sub Any thoughts on how to make this match the month then bring in the data in another column? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pulling random data from another tab in spreadsheet? | Excel Discussion (Misc queries) | |||
Pulling data from one spreadsheet to another. | Excel Worksheet Functions | |||
pulling data automatically from one spreadsheet to another | Excel Worksheet Functions | |||
Exported data pulling into another spreadsheet | Excel Discussion (Misc queries) | |||
Please Help! - Need Help pulling data from one spreadsheet to anot | Excel Worksheet Functions |