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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |