Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jeff
 
Posts: n/a
Default Urgent-Urgent VBA LOOP

Hello,

I need help to determine with thr VBA procedure below, I can to a loop to
evaluate each row in column C.
VBA Procedure

If VBPAWkbk.Worksheets("sheet1").Range("C2").Value = "SP" Then
Set CellToCheckForSP = VBPAWkbk.Worksheets("sheet1").Range("C2")
Else
Set CellToCheckForSP = VBPAWkbk.Worksheets("sheet1").Range("F99")
End If
If VBPAWkbk.Worksheets("sheet1").Range("C2").Value = "SP" Then
Set CellToCheckForSP = VBPAWkbk.Worksheets("sheet1").Range("C2")
Else
Set CellToCheckForSP = VBPAWkbk.Worksheets("sheet1").Range("F99")
End If
If VBPAWkbk.Worksheets("sheet1").Range("C2").Value = "SP" Then
Set CellWithValueToMatch = VBPAWkbk.Worksheets("sheet1").Range("A2")
Else
Set CellWithValueToMatch = VBPAWkbk.Worksheets("sheet1").Range("F2")
End If
With HeaderWks11
If (.Range("D4").Value) = CellWithValueToMatch Then
res = Application.VLookup(.Range("D4").Value, Lookup_Table_VBPA,
col_index_num, 0)
End If
HeaderWks11.Range("F3").Value = res
End With
--
Regards,
Jeff

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
Next w/o For If/Then Loop littlegreenmen1 Excel Discussion (Misc queries) 5 June 9th 05 05:28 PM
VB for excel, how do I loop through code steve hobden via OfficeKB.com Excel Discussion (Misc queries) 2 June 9th 05 01:59 PM
loop trough e-mail address list to send task lists with outlook Paul. Excel Discussion (Misc queries) 2 April 14th 05 11:48 AM
Urgent Urgent Urgent!!! Ruslan Excel Discussion (Misc queries) 6 March 30th 05 02:59 PM
Printe Autofilter Criterias in a Loop Paul. Excel Discussion (Misc queries) 1 March 25th 05 12:51 PM


All times are GMT +1. The time now is 07:08 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"