Formula to pull only cells with data from one sheet to a consolidated sheet
I am trying to pull information from a sheet in which I paste in downloaded info from my website. Since the creators of that site can't give me what I need I am attempting to set up my own worksheet. I need only the cells on Sheet 1 in columns F, G and H that have a formula result to pull to pull to sheet 7 without the blank lines between. Ideally it would be nice if it also sorted that date by the earliest time ordered.
I would also like to say that everything I know about excel has been learned from the site. I consider myself intermediate, not to knowledgeable with VBA but I can create macros that are simple. So thanks for all you help
A demonstration as a beginner starter according to the attachment only with Sheet1's columns A to C
(formulas columns are useless !), paste this code to the Sheet7 worksheet module :
PHP Code:
Sub Demo()
Dim L&, Rg As Range
L = Cells(Rows.Count, 1).End(xlUp).Row
If L > 2 Then Rows("3:" & L).Clear
L = 2
Application.ScreenUpdating = False
Set Rg = Sheet1.Cells(Rows.Count, 2).End(xlUp)
While IsNumeric(Rg.Value2)
L = L + 1
Cells(L, 1).Resize(, 3).Value = Array(Mid(Rg(0, 0).Value2, 21), Rg.Value2, Rg(1, 2).Value2)
Set Rg = Rg.End(xlUp)
Wend
Set Rg = Nothing
Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
It seemed to work in the sample book but when I use a full set of data which is 500+ lines it only grabs the very last line of information. What am I missing?
Re: Formula to pull only cells with data from one sheet to a consolidated sheet
Here is a full file. Thanks so much for your help. I am trying my best to understand what you wrote. Is there someway or somewhere I can figure that out? I don't simply want someone else to do the work for me, I would like to learn from it
As pretty all is yet in the VBA inner help, just open it !
A new demonstration as a beginner starter according to the last attachment only with Sheet1's columns A to C
(formulas columns are again useless !), paste this code to the Sheet2 worksheet module :
PHP Code:
Sub Demo1()
Dim L&, Rg As Range, R&
L = 1
Me.UsedRange.Offset(1).Clear
With Sheet1.UsedRange.Columns(1)
Set Rg = .Find("Date: *", , , xlWhole)
If Not Rg Is Nothing Then
Application.ScreenUpdating = False
R = Rg.Row
Do
L = L + 1
Cells(L, 1).Resize(, 3).Value = Array(Mid(Rg(2).Value2, 21), Rg(0, 2).Value2, Rg(0, 3).Value2)
Set Rg = .FindNext(Rg)
Loop Until Rg.Row = R
Set Rg = Nothing
Application.ScreenUpdating = True
End If
End With
End Sub
► Do you like it ? ► ► So thanks to click on bottom left star icon « ★ Add Reputation » !
Bookmarks