Insert 3 cells until string match

HECGroups

Board Regular
Joined
Jan 16, 2012
Messages
164
Hello Again,

I am looking for a VBA Macros where I can compare the data and apply formula until last row.

Example:

Look for Item code from column B in column G and if the code match then go for another item code within the same column.

If the code not found within the same row in column G then insert 3 cells i.e. column B, C & D until the item code match in column G.

The scenario is vice versa.



Excel 2012
ABCDEFGHI
1List 1Item CodeItem DescriptionPricePrice % (+)List 2Item CodeItem DescriptionPrice
2Old ListNot In Old ListNew List1159Description - 10216
3Old ListNot In Old ListNew ListR-031Description - 10633
4Old ListAMT001Description - 001100200.00%New ListAMT001Description - 001300.00
5Old ListAMT002Description - 002100300.00%New ListAMT002Description - 002400.00
6Old ListAMT003Description - 003200650.00%New ListAMT003Description - 0031500.00
7Old ListAOT006Description - 0049000.00%New ListAOT006Description - 004900.00
8Old ListAOT007Description - 0053000.00%New ListAOT007Description - 005300.00
9Old ListAOT008Description - 0061000.00%New ListAOT008Description - 006100.00
10Old ListNot In Old ListNew ListDRT001Description - 10085.00
11Old ListNot In Old ListNew ListDRT001Description - 10085.00
12Old ListDRT002Description - 0071550.00%New ListDRT002Description - 007155.00
13Old ListNot In Old ListNew ListDRT002Description - 007155.00
14Old ListDRT003Description - 0081800.00%New ListDRT003Description - 008180.00
15Old ListNot In Old ListNew ListDRT003Description - 008180.00
16Old ListDRT004Description - 009150100.00%New ListDRT004Description - 009300.00
17Old ListNot In Old ListNew ListDRT004Description - 009300.00
18Old ListDRT005Description - 0103200.00%New ListDRT005Description - 010320.00
19Old ListNot In Old ListNew ListDRT005Description - 010320.00
20Old ListDRT006Description - 0115000.00%New ListDRT006Description - 011500.00
21Old ListNot In Old ListNew ListDRT006Description - 011500.00
22Old ListLBT227Description - 0122400.00%New ListLBT227Description - 012240.00
23Old ListLBT232Description - 013110Not In New ListNew List
24Old ListLBT235Description - 0143000.00%New ListLBT235Description - 014300.00
25Old ListPH-1Description - 0160Not In New ListNew List
2
 

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

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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