Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find a specific formatted string in a cell KCK Excel Worksheet Functions 1 April 16th 08 09:16 PM
Find specific cell value nathan Excel Programming 3 January 12th 05 06:03 PM
Find last cell in a specific column Eva Shanley[_2_] Excel Programming 2 September 8th 04 09:01 PM
How to find and sub total a specific number of cell above the target cell jane Excel Programming 1 January 21st 04 03:37 PM
use find twice to find cell on a specific row captbluefin[_6_] Excel Programming 2 November 1st 03 08:22 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"