A
akemeny
How can I modify the macro below so that it will look at the values of the
cell rather than the link in the cell. The situation is that I have a master
spreadsheet that contains links to all of the individual spreadsheets, but I
need this code to look at the value of each cell rather than looking at the
link. Any help would be greatly appreciated.
Sub getvalues()
lr = Application.Max(2, Cells(Rows.Count, 1).End(xlUp).Row)
'MsgBox lr
Rows("2:" & lr).ClearContents
With Worksheets("Master")
slr = .Cells(Rows.Count, "c").End(xlUp).Row
'MsgBox slr
For i = 6 To slr
dlr = Cells(Rows.Count, "a").End(xlUp).Row + 1
' If .Cells(i, "ba") > 1 Then .Rows(i).Copy Rows(dlr)
If .Cells(i, "ba") > 1 And Not IsDate(.Cells(i, "bb")) Then
..Rows(i).Copy Rows(dlr)
Next i
End With
End Sub
cell rather than the link in the cell. The situation is that I have a master
spreadsheet that contains links to all of the individual spreadsheets, but I
need this code to look at the value of each cell rather than looking at the
link. Any help would be greatly appreciated.
Sub getvalues()
lr = Application.Max(2, Cells(Rows.Count, 1).End(xlUp).Row)
'MsgBox lr
Rows("2:" & lr).ClearContents
With Worksheets("Master")
slr = .Cells(Rows.Count, "c").End(xlUp).Row
'MsgBox slr
For i = 6 To slr
dlr = Cells(Rows.Count, "a").End(xlUp).Row + 1
' If .Cells(i, "ba") > 1 Then .Rows(i).Copy Rows(dlr)
If .Cells(i, "ba") > 1 And Not IsDate(.Cells(i, "bb")) Then
..Rows(i).Copy Rows(dlr)
Next i
End With
End Sub