Help with Delimiting Strings

crobinson661

New Member
Joined
Nov 15, 2019
Messages
11
I am trying to write a macro to compare two product listings (labeled fruit) for a unique ID between two workbooks; current days output and previous days output.

The products (fruit) are combined in one cell, comma delimited.

1574101303454.png


1574101335218.png


Essentially, I want to subtract the previous day's string from the current day's data, leaving only the current day's data for delimiting and association with pricing figures.

I may be overthinking this, but I did a VLOOKUP from the previous day's data in a column and tried using SUBSTITUTE, where I substituted the string from the previous day with (""). This worked ok, except in the case above of "uniqueID1@email.com", where it doesn't isolate the middle value ("grapes")

Afterwards I needed to use SUBSTITUTE for removal of commas as well.

I know I can delimit the previous and current days data and then subtract the range, but it's a daily process and roughly 15K entries a day, so I'm trying to see if there are other options for streamlining that I just don't know about (This is VERY likely)

Any better suggestions?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Power Query offers a choice to Split Column, By Delimiter, then Split to Rows. This would get you something like
UniqueID1@email.com Apples
UniqueID1@email.com Grapes
UniqueID1@email.com Pears
UniqueID2@email.com Apples
UniqueID2@email.com Pears

Once you had the data from both days split to Rows, then you could do a Merge query, asking for all records in today's table that is not in yesterday's table.

To use Power Query, you would need to be in Excel for Office 365, Excel 2019, or Excel 2016, running in Windows, not a Mac. Does that match your situation?

If so, check out this video showing the steps:
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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