eddiegb1

New Member
Joined
Jan 31, 2017
Messages
9
Hi,

Is there a formula or a code that can do the following?

1. Find the J1 string in the REFDES column (B).
2. Shift the J1 row / columns H, I, J and K one row down.
3. Repeat the process until all the J1 string are accounted for.
4. Still using J1 as lookup, copy the string (SDPS005F for example) from the PIN_NAME column(D).
5. Then Paste the string (SDPS005) in column K.
6. Repeat the process until all PIN_NAME strings are copied and pasted in Col L.

my-drive

my-drive

(see > After edit.. data)

=====From this raw DATA====
A B C D E F G H I J K (Col) L(PIN_NAME)
SortREFDESPIN_NUMBERPIN_NAMEPIN_XPIN_YNET_NAMESortREF_DESDUT_FET_PIN#TC_FET_PIN#
1J0110111011410.31543.3D1_VDD-A__AF81Q001-AQ001.1Q001.6
2J0114011401600.24437.95D1_VDD-A__AF82Q001-BQ001.4Q001.3
3J0114811481296.36437.95D1_VDD-A__AF83Q002-AQ002.1Q002.6
4J0119211921600.24391.18D1_VDD-A__AF84Q002-BQ002.4Q002.3
5J0120112011258.38449.76D1_VDD-A__AF85Q003-AQ003.1Q003.6
6J0124512451562.25402.99D1_VDD-A__AF86Q003-BQ003.4Q003.3
7J0129712971562.25356.21D1_VDD-A__AF87Q004-AQ004.1Q004.6
8J0135113511486.28309.44D1_VDD-A__AF88Q004-BQ004.4Q004.3
9J1D0307SDPS005F2379.04-3958.8D1_VDD-A__AF89Q005-AQ005.1Q005.6
10J0118911891714.19449.76D1_VDD-A__AP810Q005-BQ005.4Q005.3
11J0129412941676.2297.63D1_VDD-A__AP811Q006-AQ006.1Q006.6
12J0134413441752.17250.86D1_VDD-A__AP812Q006-BQ006.4Q006.3
13J0139713971714.19262.67D1_VDD-A__AP813Q007-AQ007.1Q007.6
14J0144914491714.19215.9D1_VDD-A__AP814Q007-BQ007.4Q007.3
15J0145414541524.27157.32D1_VDD-A__AP815Q008-AQ008.1Q008.6
16J0150215021676.2110.55D1_VDD-A__AP816Q008-BQ008.4Q008.3
17J0155915591486.28122.36D1_VDD-A__AP817Q009-AQ009.1Q009.6
18J1D1307SDPS009F2790.46-4630.17D1_VDD-A__AP818Q009-BQ009.4Q009.3
19J0130713071182.41356.21D1_VDD-A__AV819Q0010-AQ0010.1Q0010.6
20J0130813081144.43297.63D1_VDD-A__AV820Q0010-BQ0010.4Q0010.3
21J0141014101220.39204.09D1_VDD-A__AV821Q0011-AQ0011.1Q0011.6
22J0141314131106.44262.67D1_VDD-A__AV822Q0011-BQ0011.4Q0011.3
23J0146114611258.38215.9D1_VDD-A__AV823Q0012-AQ0012.1Q0012.6
24J0146214621220.39157.32D1_VDD-A__AV824Q0012-BQ0012.4Q0012.3
25J0151515151182.41169.13D1_VDD-A__AV825Q0013-AQ0013.1Q0013.6
26J0151615161144.43110.55D1_VDD-A__AV826Q0013-BQ0013.4Q0013.3
27J1D0309SDPS000F2097.1-4115.11D1_VDD-A__AV827Q0014-AQ0014.1Q0014.6

<colgroup><col><col><col><col><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>
...

To this:
==========After edit: Shift Down Paste=============
SortREFDESPIN_NUMBERPIN_NAMEPIN_XPIN_YNET_NAMESortREF_DESDUT_FET_PIN#TC_FET_PIN#PIN_NAME
1J0110111011410.31543.3D1_VDD-A__AF81Q001-AQ001.1Q001.6SDPS005F
2J0114011401600.24437.95D1_VDD-A__AF82Q001-BQ001.4Q001.3SDPS005F
3J0114811481296.36437.95D1_VDD-A__AF83Q002-AQ002.1Q002.6SDPS005F
4J0119211921600.24391.18D1_VDD-A__AF84Q002-BQ002.4Q002.3SDPS005F
5J0120112011258.38449.76D1_VDD-A__AF85Q003-AQ003.1Q003.6SDPS005F
6J0124512451562.25402.99D1_VDD-A__AF86Q003-BQ003.4Q003.3SDPS005F
7J0129712971562.25356.21D1_VDD-A__AF87Q004-AQ004.1Q004.6SDPS005F
8J0135113511486.28309.44D1_VDD-A__AF88Q004-BQ004.4Q004.3SDPS005F
9J1D0307SDPS005F2379.04-3958.8D1_VDD-A__AF8
10J0118911891714.19449.76D1_VDD-A__AP89Q005-AQ005.1Q005.6SDPS009F
11J0129412941676.2297.63D1_VDD-A__AP810Q005-BQ005.4Q005.3SDPS009F
12J0134413441752.17250.86D1_VDD-A__AP811Q006-AQ006.1Q006.6SDPS009F
13J0139713971714.19262.67D1_VDD-A__AP812Q006-BQ006.4Q006.3SDPS009F
14J0144914491714.19215.9D1_VDD-A__AP813Q007-AQ007.1Q007.6SDPS009F
15J0145414541524.27157.32D1_VDD-A__AP814Q007-BQ007.4Q007.3SDPS009F
16J0150215021676.2110.55D1_VDD-A__AP815Q008-AQ008.1Q008.6SDPS009F
17J0155915591486.28122.36D1_VDD-A__AP816Q008-BQ008.4Q008.3SDPS009F
18J1D1307SDPS009F2790.46-4630.17D1_VDD-A__AP8
19J0130713071182.41356.21D1_VDD-A__AV817Q009-AQ009.1Q009.6SDPS000F
20J0130813081144.43297.63D1_VDD-A__AV818Q009-BQ009.4Q009.3SDPS000F
21J0141014101220.39204.09D1_VDD-A__AV819Q0010-AQ0010.1Q0010.6SDPS000F
22J0141314131106.44262.67D1_VDD-A__AV820Q0010-BQ0010.4Q0010.3SDPS000F
23J0146114611258.38215.9D1_VDD-A__AV821Q0011-AQ0011.1Q0011.6SDPS000F
24J0146214621220.39157.32D1_VDD-A__AV822Q0011-BQ0011.4Q0011.3SDPS000F
25J0151515151182.41169.13D1_VDD-A__AV823Q0012-AQ0012.1Q0012.6SDPS000F
26J0151615161144.43110.55D1_VDD-A__AV824Q0012-BQ0012.4Q0012.3SDPS000F
27J1D0309SDPS000F2097.1-4115.11D1_VDD-A__AV8

<colgroup><col><col><col><col><col span="2"><col><col><col><col><col><col></colgroup><tbody>
</tbody>
....

Thanks,
Eddie
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Assuming you'll never have J1 in 2 or more consecutive rows, try
Code:
Sub Shiftdata()
   Dim Ar As Areas
   Dim i As Long, Rw As Long
      
   With Range("B2", Range("B" & Rows.Count).End(xlUp))
      .Replace "J1", "=xxxJ1", xlWhole, , False, , False, False
      Set Ar = .SpecialCells(xlFormulas, xlErrors).Areas
      .Replace "=xxxJ1", "J1", xlWhole, , False, , False, False
   End With
   Rw = 2
   For i = 1 To Ar.Count
      Ar(i).Offset(, 6).Resize(1, 5).Insert xlDown
      Ar(i).Offset(-(Ar(i).Row - Rw), 10).Resize(Ar(i).Row - Rw).Value = Ar(i).Offset(, 2).Value
      Rw = Ar(i).Row + 1
   Next i
End Sub
 
Upvote 0
Hi Fluff,

Thank you very much for the code. Worked great after a minor tweak.

Needed to changed Rw = 2 to Rw = 1.

It was shifting 2 rows down instead of 1.

Thanks again,
Eddie

:biggrin:
 
Last edited:
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,432
Members
448,961
Latest member
nzskater

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