View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Crowbar via OfficeKB.com Crowbar via OfficeKB.com is offline
external usenet poster
 
Posts: 128
Default Need help to understand script

Can someone please tell me which part of this script refers to the columns.
Also, why it won't complile at line 3

Dim res as Variant, res1 as Variant
dim qty as Long, pounds as Long
Dim i as Long, LastRow as Long
res = InputBox("Enter Minimum Items to Stay")
res1 = Inputbox("Enter Minimum £ to Stay")
if not(isnumeric(res) and isnumeric(res1)) then
msgbox "Invalid Values, quiting"
exit sub
end if
qty = clng(res)
pounds = clng(res1)

lastrow = cells(rows.count,1).End(xlup).row
for i = lastrow to 2 step -1
if cells(i,1) < qty and cells(i,2) < pounds then
rows(i).Delete
end if
Next


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200510/1