YellowLabPro
05-22-2007, 03:35 AM
I could use some assistance in locating the first column, first row w/ a currency value.
My current loop is hardcoded w/ the column, 26. I want to run this loop on all sheets in the workbook, and the currency value is in different columns on most of them. So I need to find the first column and the first row w/ a currency value greater than zero.
For i = 1 To Cells(Rows.Count, 26).End(xlUp).Row
If Val(Cells(i, 26)) > 0 Then
'Cells(i, 26).Copy
'Wst.Cells(i - 10, 2).PasteSpecial Paste:=xlPasteValues
'Wst.Cells(i - 10, 2).Value = Wss.Cells(i, 26).Value
Wst.Cells(i - 10, 2).Value = Cells(i, 26).Value
If Val(Cells(i, 26)) > 0 Then
Cells(i, 1).Copy
Wst.Cells(i - 10, 1).PasteSpecial Paste:=xlPasteValues
End If
End If
Next i
Thanks,
Doug
My current loop is hardcoded w/ the column, 26. I want to run this loop on all sheets in the workbook, and the currency value is in different columns on most of them. So I need to find the first column and the first row w/ a currency value greater than zero.
For i = 1 To Cells(Rows.Count, 26).End(xlUp).Row
If Val(Cells(i, 26)) > 0 Then
'Cells(i, 26).Copy
'Wst.Cells(i - 10, 2).PasteSpecial Paste:=xlPasteValues
'Wst.Cells(i - 10, 2).Value = Wss.Cells(i, 26).Value
Wst.Cells(i - 10, 2).Value = Cells(i, 26).Value
If Val(Cells(i, 26)) > 0 Then
Cells(i, 1).Copy
Wst.Cells(i - 10, 1).PasteSpecial Paste:=xlPasteValues
End If
End If
Next i
Thanks,
Doug