LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA macro Cell argument

HELP PLEASE: trying to compare the result of a cell formula in Cells(A, "C") its contains the result of a Vlookup, I am trying to look for < with another cell Cells(A, "E") the macro runs once then locks up error code 2042. Anyone any ideas please? Or better code !!!

Sub CellCompare()
Dim A As Integer
A = 1
Sheets("NIMROD001").Select
Do Until IsEmpty(Cells(A, "B"))
If Cells(A, "C") < Cells(A, "E") Then ' Doesnt like formulae
Rows(A).Copy
Sheets("Sheet1").Select
Cells(ActiveCell.Row + 1, 1).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("NIMROD001").Select
End If
A = A + 1
Loop
End Sub
 
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
Get cell address from macro function argument oscar New Users to Excel 3 June 1st 06 01:23 AM
argument and Cell Color Tom Excel Programming 3 February 20th 06 05:02 PM
Function (array argument, range argument, string argument) vba Witek[_2_] Excel Programming 3 April 24th 05 03:12 PM
pass argument to macro tommy Excel Programming 4 September 1st 04 06:21 PM
Customized Menu Macro with Argument invoked twice Alan Excel Programming 4 February 6th 04 02:54 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"