Indians1022

New Member
Joined
Aug 15, 2018
Messages
7
Hello,

I am a beginner to VBA and I am in need of some help to create a code. I have a file that contains thousands of ID's that need to be put into a list that shows each ID included in each group. The ID's are broken up in sections based off of similar products. I need to create a list that will give me all of the ID's for the particular section on one line for each separate ID. I have included a small example that shows how the list is currently set up(on left) in excel and what I need the list to look like. The SOLEOL(Start of List, End of List) is the indicator of new group of similar products. I apologize for the poor example. I am new to this site and do not know how to insert better example. Any help would be greatly appreciated. Thank you!


<tbody>
</tbody>
SOLEOL
785901824624135785901824624135 786678231114135
786678231114135786678231114135 785901824624135
SOLEOL
749761360204135749761360204135 785901871824135 786678231134135
785901871824135785901871824135 786678231134135 749761360204135
786678231134135786678231134135 749761360204135 785901871824135
SOLEOL
785901864624135785901864624135 786678231144135
786678231144135786678231144135 785901864624135
SOLEOL

<tbody>
</tbody>
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Code:
Sub TradeData()
Dim x As Long
 
Range("C1:D28").Clear
For x = 1 To 28
 
    If Cells(x, 1) = "SOLEOL" Then
        Cells(x, 3) = ""
    Else
        Cells(x, 3) = "=A:A"
    End If    
Next x
 
End Sub

I am able to get the first column of my expected results fine but my main problem is figuring out how to code the module so that the second and third column of results will also correctly calculate. All of my other attempts have resulted in the same ID for every column. Thank you again for any help or input you might have.
 
Upvote 0

Forum statistics

Threads
1,215,226
Messages
6,123,734
Members
449,116
Latest member
alexlomt

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