dhotchin1986
New Member
- Joined
- Sep 19, 2011
- Messages
- 2
Hi All,
This is driving me mad. Maybe i'm not looking at this right. I have a macro that finds data from a range from all worksheets and displays them on a summary sheet. This works great. However, if the cell its copying has a formula then it just shows Ref!
Is there away to display or to copy the cell value? It displays plain text OK.
Here is my code. The macro runs when click on a button.
This is driving me mad. Maybe i'm not looking at this right. I have a macro that finds data from a range from all worksheets and displays them on a summary sheet. This works great. However, if the cell its copying has a formula then it just shows Ref!
Is there away to display or to copy the cell value? It displays plain text OK.
Here is my code. The macro runs when click on a button.
Code:
Sub GrabData()
Dim wsComb As Worksheet
Dim wsSrc As Worksheet
Dim LastRowSrc As Long
Dim LastRowDst As Long
Set wsComb = Worksheets("Summery")
LastRowDst = 1
For Each wsSrc In Worksheets
If wsSrc.Name <> wsComb.Name Then
LastRowSrc = wsSrc.Range("A" & Rows.Count).End(xlUp).Row
wsSrc.Range("DK1:DO" & LastRowSrc).Copy wsComb.Range("A" & LastRowDst)
LastRowDst = LastRowDst + LastRowSrc
End If
Next wsSrc
End Sub