Don't know if I have this bit right or part pf bigger code that is wrong
Sub colorcopy
Dim cell as range
Dim x as integer
Dim y as integer
On error resume next
For each cell in range("A3:A35")
x = match(sheet1.range("A4"),sheet2.range("A3:A35"),0)+3
y = match(cell,sheet2.range("A3:AA3"),0)
Finally made it work. Stepinto code F8 it to see what was happening and could you believe the Lookup range was slightly out so wasn't working correctly.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.