A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro Question



 
 
Thread Tools Display Modes
  #1  
Old June 30th, 2004, 11:29 PM
Scottmk
external usenet poster
 
Posts: n/a
Default Macro Question

Hello everyone,
I have the following Code in Excel:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address "$G$4" Then Exit Sub
Application.Goto Cells.Find(Target, after:=Target)
End Sub

I'm sure you are familiar with this??? Someone gave it to me here
awhile ago. It just lets me type something in a cell and then it goes
and finds whatever I typed on the worksheet.

Okay, here is what I would like my code to do. Instead of going to the
cell that contains that data, I would like it to return the value of
the cell to the right of that cell in the cell underneath the one you
enter stuff in. Got it?? I know. Also, there is going to be more
than just one, so how can I get it to return all values to the right of
all values I entered? Whoa, here is an example:

I have a list that is sorted:

DDD John
DDD Mike

EEE AL
EEE Joe
EEE John

GGG Joe

HHH Joe

Okay, So I type into Cell G4 (going back to the code) "DDD". I want
Cells G6 and G7 to display John and Mike, respectively. Thank you so
much!


---
Message posted from http://www.ExcelForum.com/

  #2  
Old July 1st, 2004, 02:56 AM
Scottmk
external usenet poster
 
Posts: n/a
Default Macro Question

by the way, the solution doesn't need to be in VBA code, but I would
prefer it. Thanks , Scott


---
Message posted from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Question richard birkett New Users 1 June 16th, 2004 01:52 PM
macro question Joe Silvers Worksheet Functions 1 September 16th, 2003 02:34 PM


All times are GMT +1. The time now is 10:10 PM.


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