![]() |
Matching to dynamic range.
Hi all,
Please tell me how to match to a range. I have 3 sheets with SKU and Quantity columns. Sh1 has sales data which is a combination of in house stock Sh2 and outside stock Sh3. What I need to do is copy any rows (from Sh1) whose SKUs do not exist in Sh2 to Sh3. In other words if the SKU column in Sh1 is (1,2,3,4,5,6) and in Sh2 (2,3,6) then Sh3 should have the rows with SKUs (1,4,5) copied into it. The data in both Sh1 and Sh2 is non sequential and changes all the time so I cannot simply say (if SKU X) and I cannot hard code the SKUs e.g (if SKU NOT= 1 and NOT=2 etc) so I need to somehow say: for each row R in sh1 if R.SKU not = (any of the SKUs in Sh2.SKU) Copy R into Sh3 Please excuse my pseudo VB, I hope this makes sense. Any help, advice, links to places where I can learn this stuff: Very much appreciated Thanks in advance. |
Matching to dynamic range.
This is Zebrahead. I seem to have posted twice.
Thinking it didn't go through. Post "Copy rows that do not match values in dynamic range" is the same thing. sorry "Zebrahead" wrote: Hi all, Please tell me how to match to a range. I have 3 sheets with SKU and Quantity columns. Sh1 has sales data which is a combination of in house stock Sh2 and outside stock Sh3. What I need to do is copy any rows (from Sh1) whose SKUs do not exist in Sh2 to Sh3. In other words if the SKU column in Sh1 is (1,2,3,4,5,6) and in Sh2 (2,3,6) then Sh3 should have the rows with SKUs (1,4,5) copied into it. The data in both Sh1 and Sh2 is non sequential and changes all the time so I cannot simply say (if SKU X) and I cannot hard code the SKUs e.g (if SKU NOT= 1 and NOT=2 etc) so I need to somehow say: for each row R in sh1 if R.SKU not = (any of the SKUs in Sh2.SKU) Copy R into Sh3 Please excuse my pseudo VB, I hope this makes sense. Any help, advice, links to places where I can learn this stuff: Very much appreciated Thanks in advance. |
Matching to dynamic range.
How do I delete this duplicate post?
Zebrahead "Zebrahead" wrote: Hi all, Please tell me how to match to a range. I have 3 sheets with SKU and Quantity columns. Sh1 has sales data which is a combination of in house stock Sh2 and outside stock Sh3. What I need to do is copy any rows (from Sh1) whose SKUs do not exist in Sh2 to Sh3. In other words if the SKU column in Sh1 is (1,2,3,4,5,6) and in Sh2 (2,3,6) then Sh3 should have the rows with SKUs (1,4,5) copied into it. The data in both Sh1 and Sh2 is non sequential and changes all the time so I cannot simply say (if SKU X) and I cannot hard code the SKUs e.g (if SKU NOT= 1 and NOT=2 etc) so I need to somehow say: for each row R in sh1 if R.SKU not = (any of the SKUs in Sh2.SKU) Copy R into Sh3 Please excuse my pseudo VB, I hope this makes sense. Any help, advice, links to places where I can learn this stuff: Very much appreciated Thanks in advance. |
Matching to dynamic range.
This question has already been answered in response to your earlier posting
of the question. -- Regards, Tom Ogilvy "Zebrahead" wrote: Hi all, Please tell me how to match to a range. I have 3 sheets with SKU and Quantity columns. Sh1 has sales data which is a combination of in house stock Sh2 and outside stock Sh3. What I need to do is copy any rows (from Sh1) whose SKUs do not exist in Sh2 to Sh3. In other words if the SKU column in Sh1 is (1,2,3,4,5,6) and in Sh2 (2,3,6) then Sh3 should have the rows with SKUs (1,4,5) copied into it. The data in both Sh1 and Sh2 is non sequential and changes all the time so I cannot simply say (if SKU X) and I cannot hard code the SKUs e.g (if SKU NOT= 1 and NOT=2 etc) so I need to somehow say: for each row R in sh1 if R.SKU not = (any of the SKUs in Sh2.SKU) Copy R into Sh3 Please excuse my pseudo VB, I hope this makes sense. Any help, advice, links to places where I can learn this stuff: Very much appreciated Thanks in advance. |
All times are GMT +1. The time now is 07:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com