Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Code to mimic vlookup

I am trying to create a macro that will do the following.

1). Look in a column on a one worksheet, going row by row, for a specified
text value.
2). If the value is found, then the value in the column to the left should
be copied.
3). The copied value should be pasted in a seperate worksheet in a specified
column.
4). The process should repeat until all matches in the first sheet have been
found, copied, and pasted in separate rows on the second worksheet.

The following is my ineffective code, at present. Any help is appreciated!

Sub Business_Populate()

Dim j As Long
Dim k As Long

With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False


Sheets("Setup Form").Select
Range("d4:d33").Select
For j = Selection.Cells.Count To 1 Step -1
If Selection.Cells(j) = "Business" Then
Selection.Cells(j, "d").Offset(0, -3).Copy

End If
Next j

Sheets("Project Completion Costs").Select
Range("e10,e43").Select
For k = Selection.Cells.Count To 34 Step 1
If Cells(k, "e") = "" Then
Cells(k, "e").Select
ActiveSheet.Paste


End If
Next k

End With
End Sub
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
Mimic a watermark BusAdmAsst Excel Discussion (Misc queries) 2 April 11th 07 12:16 AM
Mimic Undo actions Chris W. Excel Programming 2 March 21st 05 03:00 PM
mimic Working Days in ATP Mika Excel Programming 4 March 4th 05 07:46 PM
[URGENT]How to mimic the toolbar zoom button from code Umberto Giacobbi[_2_] Excel Programming 1 August 12th 04 03:31 PM
Help creating mimic input box nrage21 Excel Programming 1 January 13th 04 02:27 PM


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

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"