Thema Datum  Von Nutzer Rating
Antwort
Rot modify formula Index Match in Macro to "go to next" if match not found
06.06.2013 15:42:04 Hawkins Okeyo
NotSolved
07.06.2013 08:22:32 schokobons
NotSolved
07.06.2013 10:06:44 Hawkins Okeyo
NotSolved
07.06.2013 10:22:38 Gast3280
NotSolved
07.06.2013 11:24:25 Gast69626
NotSolved
07.06.2013 11:25:50 Hawkins Okeyo
NotSolved
07.06.2013 13:44:54 schokobons
Solved
07.06.2013 14:09:30 Hawkins Okeyo
NotSolved
07.06.2013 14:16:06 schokobons
NotSolved
07.06.2013 14:20:05 Hawkins Okeyo
NotSolved
07.06.2013 14:41:15 schokobons
NotSolved
07.06.2013 15:13:54 Hawkins Okeyo
NotSolved
07.06.2013 17:15:23 schokbons
NotSolved
08.07.2013 00:22:36 schokobons
NotSolved

Ansicht des Beitrags:
Von:
Hawkins Okeyo
Datum:
06.06.2013 15:42:04
Views:
2137
Rating: Antwort:
  Ja
Thema:
modify formula Index Match in Macro to "go to next" if match not found

I will highly appreciate your help.
I have this code which searches and Match corresponding column with exact values from another workbook. to make it more clear, in WB1 i have two columns a:a and b:b with data and on the other WB2 same BUT with more data in column a:a. all the data in column a:a WB1 are in WB2 column a:a but not the other way round.
My code searches and matches and copy paste the exact data from the two WB's but the only thing it doesn't do is to Skip the data which are in WB2 but absent in WB1.
can somebody help me modify this code to skip this cells and go to next OR if you have a better code, can you help.
Thank you. Here is the Macro that i am using at the moment.

Dim DataFile, WorkingFile As Workbook
Dim DataLastRow, WorkingLastRow As Double
'Turn off screen updating
Application.ScreenUpdating = False
'Open the combined file
Windows("CopyAllHere.xlsm").Activate
ThisWorkbook.Worksheets("4525003").Select
'---------------------------------
Set DataFile = ActiveWorkbook
'---------------------------
DataLastRow = Range("A65536").End(xlUp).Row
'-----------------------------
Workbooks.Open Filename:="H:\A350_PREPS\Macro\Strain_Prediction_FST_All_LCs_using_DFEMs_v2.xls"
Set WorkingFile = ActiveWorkbook
Worksheets("4525003").Select
WorkingLastRow = Range("A65536").End(xlUp).Row
On Error Resume Next
Range("B2:B" & WorkingLastRow).Formula = _
"=INDEX(" & DataFile.Name & "!B$2:B" & DataLastRow & ",MATCH($A$2:$A$" & WorkingLastRow & _
"," & DataFile.Name & "!$A$2:$A$" & DataLastRow & ",0))"
On Error GoTo 0

Range("B2:B" & WorkingLastRow).Copy
Range("B2:B" & WorkingLastRow).PasteSpecial xlPasteValues

Application.CutCopyMode = False
'Turn on screen updating
Application.ScreenUpdating = True
End Sub


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
Rot modify formula Index Match in Macro to "go to next" if match not found
06.06.2013 15:42:04 Hawkins Okeyo
NotSolved
07.06.2013 08:22:32 schokobons
NotSolved
07.06.2013 10:06:44 Hawkins Okeyo
NotSolved
07.06.2013 10:22:38 Gast3280
NotSolved
07.06.2013 11:24:25 Gast69626
NotSolved
07.06.2013 11:25:50 Hawkins Okeyo
NotSolved
07.06.2013 13:44:54 schokobons
Solved
07.06.2013 14:09:30 Hawkins Okeyo
NotSolved
07.06.2013 14:16:06 schokobons
NotSolved
07.06.2013 14:20:05 Hawkins Okeyo
NotSolved
07.06.2013 14:41:15 schokobons
NotSolved
07.06.2013 15:13:54 Hawkins Okeyo
NotSolved
07.06.2013 17:15:23 schokbons
NotSolved
08.07.2013 00:22:36 schokobons
NotSolved