-
Hi,
some code attached,
but it is still not enought :-)
[VBA]
Sub analize()
'define REPORT DATE
repdate=format(now,"dd.MM.yyyy")
'find last rawsheet row (lastrow)
lastrow=sheets("raw").cells(65500,1).end(xlup).row
'find where we will write row(actwriterow)
actwriterow=sheets("Paid & Wait").cells(5,1).end(xldown).row
if actwriterow>65500 then actwriterow=6
'cycle start from actrow=2 to lastrow
with sheets("raw")
for actrow=2 to lastrow
'if found "PAID & WAIT TOTAL" then check the next cell
if .cells(actrow,2)="PAID & WAIT TOTAL" and .cells(actrow,3)>0 then
'select the cells(actrow-2,PAYMT_date_col)
xdate=.cells(actrow-2,1)
if (repdate-xdate)>8 then
'check date diff
'if needed, then read more details like before select
fnd=.cells(actrow-1111(?),1) 'u have to found it
'because you have a offset points
'...etc
'write datas like
'sheets("Paid & Wait").cells(actwriterow,1)=fnd
'sheets("Paid & Wait").cells(actwriterow,2)=typ
'sheets("Paid & Wait").cells(actwriterow,3)=paydate
'...etc
'increase actwriterow
actwriterow = actwriterow + 1
end if
end if
'cycle End from actrow (2 to lastrow)
next actrow
end with
'msgbox "analize done"
End Sub [/VBA]
I'll come back later
bye
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules