Hi!

I hope someone could help me with putting the following to VBA, it would be very useful for me. It is really simple.

I have a file already filled with data. It is a reporting template. I got sent a new version of the file, there were some new rows added to the file on some sheets. In the orange (RGB: 266,165,0) cells in the new file into every worksheet I should put the following function

something like this:
= vlookup (b1;nameofotherfile.nameofcurrentworkbook'!B:E;2;0)

maybe even better as
IFERROR(the vlookup;"new row") to indicate that the new row should be filled with data manually, as it's value cannot be vlookup-ed from the old file


The formula should run through all sheets. I think there are no new sheets added. The sheet names did not change. For all sheets in the new file it should Vlookupthe values from the old file, if the cells. color is (RGB: 266,165,0). These cells that I have to vlookup the data to are not only in column C but also sometimes in columns D, E, F and so on.

Many thanks,

Thomas