Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Macro Modification

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Macro Modification

You already had the answer. Use the Value property to return the value.

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").Value 1 Then .Rows(i).Copy Rows(dlr)
If .Cells(i, "ba").Value 1 And Not IsDate(.Cells(i, "bb")) Then
..Rows(i).Copy Rows(dlr)
Next i
End With
End Sub



"akemeny" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Modification help akemeny Excel Programming 3 October 8th 08 06:02 PM
Macro Modification Carl Excel Worksheet Functions 2 August 30th 06 01:53 PM
Macro modification Hirsch Excel Discussion (Misc queries) 3 May 27th 05 10:21 PM
Macro modification HJ Excel Programming 6 November 3rd 04 07:37 PM
Macro Modification Help MM[_4_] Excel Programming 1 July 29th 04 10:37 PM


All times are GMT +1. The time now is 10:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"