• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Needed help in running the macro

Kausik

New Member
Hi Folks, Needed a very urgent help.

I have developed a macro where it pulls the data from WorkBook 2 based on Criteria in Workbook 1. Macro is running fine but it takes more time to populate the data for me since the Workbook 2 *SERP DATA DUMP" is a 61 MB file.

Can someone help me ASAP? as I need to present this one in tomorrow's meeting.

Thanks in advance.

Code:
Sub Filter&Paste()
Dim wsData As Worksheet
Dim wsMacro As Worksheet
Dim sToFind As String
Dim sFirstAddress As String
Dim nr As Long, lr As Long
Dim rFind As Range
Set wsData = Workbooks("SERP Data Dump.xlsm").Sheets("Data")
Set wsMacro = Workbooks("Preliminary SERP SOA template.xlsm").Sheets("FBL Data")

lr = wsData.Range("F" & Rows.Count).End(xlUp).Row
sToFind = wsMacro.Range("A1").Value
nr = wsMacro.Range("A" & Rows.Count).End(xlUp).Row + 1
Set rFind = wsData.Range("F1:F" & lr).Find(What:=sToFind)

If rFind Is Nothing Then
MsgBox sToFind & " could not be found in Column F", vbInformation, "Not Found"
Exit Sub
End If
sFirstAddress = rFind.Address
Do
rFind.EntireRow.Copy
wsMacro.Range("A" & nr).PasteSpecial xlPasteAll
nr = nr + 1
Set rFind = wsData.Range("F1:F" & lr).FindNext(After:=rFind)
Loop Until rFind.Address = sFirstAddress
Set rFind = Nothing
Set wsData = Nothing
Set wsMacro = Nothing

Rows("3:3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A3").Select
End Sub
 
Last edited by a moderator:
Hi John,

Attached sample file, can you please help me?
 

Attachments

  • Preliminary Blue Print SOA template.xlsm
    385.5 KB · Views: 1
  • BLue Print Data Dump.xlsm
    709.3 KB · Views: 1
Hi again, @Kausik!

One thing to consider:
The main titles in Sheet FBL Data must be exactly the same of sheet Data. Check Bring Data Macro in attached file. Blessings!
 

Attachments

  • Preliminary Blue Print SOA template.xlsm
    377.5 KB · Views: 3
Needed one more help, My macro "CreateFMCDlrUploadXLS" is not attached file, can you help on that. It was working fine till today suddenly it has stopped
 

Attachments

  • SERP Data Dump.xlsm
    836.5 KB · Views: 1
Hi, again!

Check if you have this route in your pc.
C:\temp\FCSD\

If not, you must create before running macro. Blessings!
 
With the same Blue Print SOA Template where it pulls the data from Blue Print Data Dump, Can the excel files be automatically generated with the drop down available in FBL data Sheet and gets saved automatically in the location path available in M4 cell of Check Points sheet in Blue Print SOA Template.
 

Attachments

  • Preliminary Blue Print SOA template.xlsm
    373.2 KB · Views: 2
  • BLue Print Data Dump.xlsm
    834.2 KB · Views: 2
Name
With the same Blue Print SOA Template where it pulls the data from Blue Print Data Dump, Can the excel files be automatically generated with the drop down available in FBL data Sheet and gets saved automatically in the location path available in M4 cell of Check Points sheet in Blue Print SOA Template.
Name in which the file needs to get saved is in E1 cell of Summary Tab of Preliminary Blue Print SOA File
 
Hi, again!

Last help in this post. Check the new macro (CreateWB). Blessings!
 

Attachments

  • Preliminary Blue Print SOA template.xlsm
    379.2 KB · Views: 4
Thanks John, but I need the whole file to be saved and not data sheet alone.
 
Last edited by a moderator:
Back
Top