

Set dic = CreateObject("Scripting.Dictionary") MsgBox "Customer has no forecast available", vbExclamation, "No Forecast Available" If Sheets("A_19_01").Range("B" & StartRow).Value = StartDate Then

So bassically i neet to tweak the VBA a little bit, so that when a text is found in "date_1901_908"!A21, to skip the importing of "date_1901_908" column B into "A_19_01" column AM. The code is expecting a date (dd/mm/yy), in "date_1901_908"!A21, not a text, so it returns a ""runtime error 1004 method range object_global failed" In this case, he usually write "no forecast available" in "date_1901_908"!A21.

On sheet "date_1901_908", column A is formated as date and column B as number.Įverything is working just fine, until our customer doesn't have any product request in sheet "date_1901_908". the VBA reads the date (dd/mm/yy) in "date_1901_908"! starting from A21 and going down and copy the numbers in column B (starting from B21 and going down), to sheet "A_19_01" column AM. on "date_1901_908" i have a list of dates (dd/mm/yy) on column A, starting from A21, and some numbers on column B, starting from B21. on "A_19_01" column B i have a list of dates (dd/mm/yy) and on column AM i have a list of numbers (basically the same numbers as sheet "date_1901_908" column B) i have two sheets: "A_19_01" (this is the main sheet) and "date_1901_908" (this is a request sheet, that i recieve daily from our customers) I tried to clean my code a little bit, i hope it's better now Find(Sheets(15).Range("A" & nxtRw), lookat:=xlWhole)

LastRw2 = Sheets(15).Range("A" & Rows.Count).End(xlUp).Row Range("19_01!AM" & FndRw & ":AM" & lastRw1).ClearContents If Range("19_01!B" & StartRow).Value = StartDate Then LastRw1 = Sheets(11).Range("B" & Rows.Count).End(xlUp).Row I have around 10 more VBAs before this one, none of them return an error, but this one (they are identical, only page numbers a different): Please help with an "runtime error 1004 method range of object _global failed" error, that i recieve in this vba.
