DevanG
06-10-2011, 05:27 AM
First post here... might have to get used to me... I'm used to java and i'm trying vba now.. Why is this simple comparison not working?
(its running from 2 loops, hence the two variable)
If Workbooks(Name).Sheets(1).Range("B" & i).Value = Workbooks(wbook).Sheets(1).Range("A" & j).Value Then
wbook.Sheets(1).Range("A" & j).Copy Workbooks(Name).Sheets(1).Range("A" & (j + 3))
sorry nvm... wbook just was a workbook not a string
(its running from 2 loops, hence the two variable)
If Workbooks(Name).Sheets(1).Range("B" & i).Value = Workbooks(wbook).Sheets(1).Range("A" & j).Value Then
wbook.Sheets(1).Range("A" & j).Copy Workbooks(Name).Sheets(1).Range("A" & (j + 3))
sorry nvm... wbook just was a workbook not a string