ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find a row and a specific cell in that row (https://www.excelbanter.com/excel-programming/331296-find-row-specific-cell-row.html)

Glenn P

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


tina

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



Glenn P[_2_]

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


mangesh_yadav[_274_]

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


Glenn P[_3_]

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


mangesh_yadav[_289_]

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



All times are GMT +1. The time now is 07:32 AM.

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