Check if Value Existing in Multiple Column with Criteria

JarekM

Board Regular
Joined
Nov 13, 2018
Messages
86
Hi, I am attaching a screenshot below for reference. I have a data table with items, I have a column of numbers of over 10,000 rows. Before I add a new item to the table, I need to use VBA to check if STORE SKU# matches with pre-existing STORE SKU# and if so then it will check the city and if the city matches as well then it will look at the unit price in the column (such as in the sample) and if the unit price is different then it should save the row to TbHistory sheet and then update the price to the current price in the TbProduct sheet. This should be done if both criteria are met, so if STORE SKU# match and city. If the STORE SKU# matches but not city, then it should just save it as a new product in TBProduct sheet.

Can someone please help me and please let me know if I need to clarify anything?

Excel.JPG
 

Attachments

  • Excel.JPG
    Excel.JPG
    66.3 KB · Views: 3

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi, I am attaching a screenshot below for reference. I have a data table with items, I have a column of numbers of over 10,000 rows. Before I add a new item to the table, I need to use VBA to check if STORE SKU# matches with pre-existing STORE SKU# and if so then it will check the city and if the city matches as well then it will look at the unit price in the column (such as in the sample) and if the unit price is different then it should save the row to TbHistory sheet and then update the price to the current price in the TbProduct sheet. This should be done if both criteria are met, so if STORE SKU# match and city. If the STORE SKU# matches but not city, then it should just save it as a new product in TBProduct sheet.

Can someone please help me and please let me know if I need to clarify anything?

View attachment 84208
Can you try sharing your data again using this forums Excel Add-in?
It makes it much easier to get the information people need to help you.
Best regards,
 
Upvote 0
Can you try sharing your data again using this forums Excel Add-in?
It makes it much easier to get the information people need to help you.
Best regards,
Hi, I am not sure as to what you are looking for. Should I resend the screenshot? If you are wondering about code, then I don't have any. I am looking for code that would do what I said in my first message.
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,413
Members
449,082
Latest member
tish101

We've detected that you are using an adblocker.

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.
Go back
Back
Top