Maybe like this:
Code:If Not LotFind Is Nothing Then LotVal = LotFind.Offset(0, -1).Value - LotNum.Offset(0, 1).Value If LotVal <= 0 Then LotFind.EntireRow.Delete xlShiftUp Else If LotFind.Offset(0, -1).HasFormula Then LotFind.Offset(0, -1).Value = LotFind.Offset(0, -1).Formula & "-" & LotNum.Offset(0, 1).Value Else LotFind.Offset(0, -1).Value = "=" & LotFind.Offset(0, -1).Value & "-" & LotNum.Offset(0, 1).Value End If End If LotNum.EntireRow.ClearContents Set LotFind = Nothing End If
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
wow.what i can say JB.u are real guru,how many rep+ i can give.that all i will give to u.this is a brilliant help.thanks a lot again again again & again.....
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks