ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check variance code not working (https://www.excelbanter.com/excel-programming/312082-check-variance-code-not-working.html)

goss[_34_]

Check variance code not working
 

Thanks Tom
Unfortunatley still not working

Seems like 2 issues:

1. Loop should stop when empty cell found in col O
Currently I have row 2 6011.001
row 3 6011.002

That is all the test data so should terminate after 2 iterations
It does not.

2. $M$12 is not updating
First iteration should = 6011.001
Second should = 6011.002

However the printouts still have the beginning account
number of 6410.0120

TIA
-gos

--
gos

-----------------------------------------------------------------------
goss's Profile: http://www.excelforum.com/member.php...nfo&userid=460
View this thread: http://www.excelforum.com/showthread.php?threadid=26517


Tom Ogilvy

Check variance code not working
 
Sub Check_Next()
with worksheets("Accnt_Compare")
set rng = .Range(.Cells(2,"O"),.Cells(rows.count,"O").end(xl up)
for each cell in rng
.Range("M12").Value = cell.Value ' M12 or M2?
Application.Calculate
If Val(.Cells(23, 8)) 19.99 Then
Call Print_Job
End if
Next
end with
end Sub

--
Regards,
Tom Ogilvy


"goss" wrote in message
...

Thanks Tom
Unfortunatley still not working

Seems like 2 issues:

1. Loop should stop when empty cell found in col O
Currently I have row 2 6011.001
row 3 6011.002

That is all the test data so should terminate after 2 iterations
It does not.

2. $M$12 is not updating
First iteration should = 6011.001
Second should = 6011.002

However the printouts still have the beginning account
number of 6410.0120

TIA
-goss


--
goss


------------------------------------------------------------------------
goss's Profile:

http://www.excelforum.com/member.php...fo&userid=4602
View this thread: http://www.excelforum.com/showthread...hreadid=265174





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com