Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Excel Experts and Users,
Excel 2002 Code to do the following: Sheet 1 B3 = 123 Sheet 1 B5 = "What" Sheet 1 B6 = "Ever" On Sheet 2 find 123 in column D (Anywhere in D:D) On sheet 2 "What" goes in same row in column K On sheet 2 "Ever" goes in same row in column L I can make it work quite easily if 123 is the last value in Sheet 2, column D, but that may not be the case. Have floundered with Find and Offset and Resize but am upside down! Damn, I know I have done this and cannot find examples in my archives or Google. Thanks, Regards, Howard |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Howard,
Try this: Private Sub CommandButton3_Click() Dim FoundCell As Range Dim SourceWS As Worksheet Const COLUMN_K As Long = 11 Const COLUMN_L As Long = 12 Set SourceWS = Worksheets(1) With Worksheets(2) Set FoundCell = .Range("D:D").Find(SourceWS.Range("B3").Value, , xlValues) If Not FoundCell Is Nothing Then .Cells(FoundCell.Row, COLUMN_K).Value = SourceWS.Range("B5") .Cells(FoundCell.Row, COLUMN_L).Value = SourceWS.Range("B6") End If End With End Sub NickHK "L. Howard Kittle" wrote in message . .. Hello Excel Experts and Users, Excel 2002 Code to do the following: Sheet 1 B3 = 123 Sheet 1 B5 = "What" Sheet 1 B6 = "Ever" On Sheet 2 find 123 in column D (Anywhere in D:D) On sheet 2 "What" goes in same row in column K On sheet 2 "Ever" goes in same row in column L I can make it work quite easily if 123 is the last value in Sheet 2, column D, but that may not be the case. Have floundered with Find and Offset and Resize but am upside down! Damn, I know I have done this and cannot find examples in my archives or Google. Thanks, Regards, Howard |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks NickHK,
I will give it a go. I probably don't need the Command Button Click...?? Use a Forms button maybe? Off to try to make it work. I'm sure it is an exact answer to what I asked, but still a bit puzzeling to me. Thank you, ...Film at 11 Regards, Howard "L. Howard Kittle" wrote in message . .. Hello Excel Experts and Users, Excel 2002 Code to do the following: Sheet 1 B3 = 123 Sheet 1 B5 = "What" Sheet 1 B6 = "Ever" On Sheet 2 find 123 in column D (Anywhere in D:D) On sheet 2 "What" goes in same row in column K On sheet 2 "Ever" goes in same row in column L I can make it work quite easily if 123 is the last value in Sheet 2, column D, but that may not be the case. Have floundered with Find and Offset and Resize but am upside down! Damn, I know I have done this and cannot find examples in my archives or Google. Thanks, Regards, Howard |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi NickHK,
Code works perfect, thanks a ton! Regards, Howard "L. Howard Kittle" wrote in message . .. Hello Excel Experts and Users, Excel 2002 Code to do the following: Sheet 1 B3 = 123 Sheet 1 B5 = "What" Sheet 1 B6 = "Ever" On Sheet 2 find 123 in column D (Anywhere in D:D) On sheet 2 "What" goes in same row in column K On sheet 2 "Ever" goes in same row in column L I can make it work quite easily if 123 is the last value in Sheet 2, column D, but that may not be the case. Have floundered with Find and Offset and Resize but am upside down! Damn, I know I have done this and cannot find examples in my archives or Google. Thanks, Regards, Howard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find and copy to another sheet | Excel Discussion (Misc queries) | |||
Copy link to offset sheet | Excel Worksheet Functions | |||
Find, Copy offset to offset on other sheet, Run-time 1004. | Excel Programming | |||
find value in one sheet use this as the row to copy the value in c | Excel Programming | |||
how to find and copy values on sheet 2, based on a list on sheet 1 | Excel Programming |