Add new row by looping column (Scripting Dictionary)

SamKhem

Board Regular
Joined
Mar 18, 2024
Messages
50
Office Version
  1. 2016
Platform
  1. Windows
Dear Senior member

I would like request you to guide coding vba with scripting dictionary to run loop in one column to create another row such
Loop column G is reference and F is amount to generate new column with add row in column L and M.

Thank in advance for your assist.
Best regards,
OLDNEW
REFERENCEAMOUNTREFERENCEAMOUNT
PL2308200035-188.28HD2308200035188.28
PL2308200035-188.28
REFERENCEAMOUNT
AC2319900001-100AC2319900001-100
PL2319900001-0.02HD2319900001100
PL2319900001-0.02
HD23199000010.02
REFERENCEAMOUNT
AC2319900009120000AC2319900009120000
ACI23199000091787.8HD2319900009-120000
ACI2319900009114.12ACI23199000091787.8
HD2319900009-1787.8
ACI2319900009114.12
HD2319900009-114.12
REFERENCEAMOUNT
AC2319100027-0.07AC2319100027-0.07
AC23191000270.07PL23191000270.07
AC2319100027100AC2319100027100
PL23191000270.07HD2319100027-100
AC23191000270.07
HD2319100027-0.07
REFERENCEAMOUNT
AC2319100028-0.76AC2319100028-0.76
PL23191000280.76PL23191000280.76
AC23191000281000HD2319100028-1000
AC23191000280.83AC23191000281000
PLF23191000280.05HD2319100028-0.83
AC23191000280.83
HD2319100028-0.83
PLF23191000280.05
REFERENCEAMOUNT
AC231910002910,000.00HD2319100029(10,000.00)
AC231910002923.64AC231910002910,000.00
AC2319100029(21.01)HD2319100029(23.64)
PL231910002921.01AC231910002923.64
ACI23191000291.51AC2319100029(21.01)
PLF23191000290.01PL231910002921.01
HD2319100029(1.51)
ACI23191000291.51
HD2319100029(0.01)
PLF23191000290.01
 
Ok getting closer. Do the references always start with AC, ACI, PL, PLF followed by exactly 10-digit numbers?
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I'm signing off for tonight. I'll look closer tomorrow. Someone might give you a solution before then.
 
Upvote 0
Could you help to check revised this
Condition AC.xlsx
ABCDEFGH
4OLDNEW
5REFERENCEAMOUNTREFERENCEAMOUNT
6AC2308200035-188.28AC2308200035188.28
7AC2319900001-100AC2308200035-188.28
8AC2319900001-0.02
9AC2319900009120000REFERENCEAMOUNT
10AC23199000091787.8AC2319900001-100
11AC2319900009114.12AC2319900001100
12AC2319100027-0.07AC2319900001-0.02
13AC23191000270.07AC23199000010.02
14AC2319100027100
15PL23191000270.07REFERENCEAMOUNT
16AC2319900009120000
17AC2319900009-120000
18AC23199000091787.8
19AC2319900009-1787.8
20AC2319900009114.12
21AC2319900009-114.12
22
23REFERENCEAMOUNT
24PL2319100027-0.07
25PL23191000270.07
26AC2319100027100
27AC2319100027-100
28AC23191000270.07
29AC2319100027-0.07
Sheet1
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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