Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a row and a specific cell in that row
Hello, I have a database in a worksheet with several columns (with headers). From a VBA input sheet, I would like to be able to search a database using the Last Name column - say column B - as my key search, locate the row the Last Name is on, and go to a specific cell on that row - say in column P - and edit the data in that cell. I'm sure this is child's play for some of you but I have not had any luck so far with the right code. Any help in this regard would be greatly appreciated. Thanks in advance, Glenn P -- Glenn P ------------------------------------------------------------------------ Glenn P's Profile: http://www.excelforum.com/member.php...o&userid=23595 View this thread: http://www.excelforum.com/showthread...hreadid=377601 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a row and a specific cell in that row
Hi
if you mean find the last name inputed in column b you could try something like Sub Macro1() Range("B65536").End(xlUp).Offset(0, 14) .select End Sub "Glenn P" wrote: Hello, I have a database in a worksheet with several columns (with headers). From a VBA input sheet, I would like to be able to search a database using the Last Name column - say column B - as my key search, locate the row the Last Name is on, and go to a specific cell on that row - say in column P - and edit the data in that cell. I'm sure this is child's play for some of you but I have not had any luck so far with the right code. Any help in this regard would be greatly appreciated. Thanks in advance, Glenn P -- Glenn P ------------------------------------------------------------------------ Glenn P's Profile: http://www.excelforum.com/member.php...o&userid=23595 View this thread: http://www.excelforum.com/showthread...hreadid=377601 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a row and a specific cell in that row
Thanks Tina, Here is what I have now. Private Sub TextBox12_Enter() Set rng = Sheets("Members").Range("D3:Y3999") TextBox12.Value = WorksheetFunction.VLookup(ComboBox7.Value, rng, 11, 0) ComboBox7 is the Members list of names from which I select a specific name. That is what the VLookup will key from and return the value from the cell in Column N in that specific row, which is returned in TextBox12. The code works fine through this point. What I would like to do now is be able to edit that data from the Column N cell (which is in TextBox12 )and return it to that same cell (with the new updated info). This is where I bog down. How do I identify the specifc cell address so I can accomplish this task? Thanks so much for your help. Glenn -- Glenn P ------------------------------------------------------------------------ Glenn P's Profile: http://www.excelforum.com/member.php...o&userid=23595 View this thread: http://www.excelforum.com/showthread...hreadid=377601 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a row and a specific cell in that row
TextBox12.Value = WorksheetFunction.VLookup(ComboBox7.Value, rng, 11, 0) myRow = WorksheetFunction.Match(ComboBox7.Value, Range("D3:D3999"), 0)+2 Worksheets("Members").Cells(myRow, 11) = TextBox12.Value since you start from row 3, you add 2 in the second line. Mangesh -- mangesh_yadav ------------------------------------------------------------------------ mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470 View this thread: http://www.excelforum.com/showthread...hreadid=377601 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a row and a specific cell in that row
Mangesh, Thanks for the assistance. I understand the code and it works t perfection. Youdaman! Glen -- Glenn ----------------------------------------------------------------------- Glenn P's Profile: http://www.excelforum.com/member.php...fo&userid=2359 View this thread: http://www.excelforum.com/showthread.php?threadid=37760 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a row and a specific cell in that row
Glad it worked as you wanted. Thanks for the feedback. Mangesh -- mangesh_yadav ------------------------------------------------------------------------ mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470 View this thread: http://www.excelforum.com/showthread...hreadid=377601 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find a specific formatted string in a cell | Excel Worksheet Functions | |||
Find specific cell value | Excel Programming | |||
Find last cell in a specific column | Excel Programming | |||
How to find and sub total a specific number of cell above the target cell | Excel Programming | |||
use find twice to find cell on a specific row | Excel Programming |