Fill data with the range selected from the last row used

isay

New Member
Joined
Oct 14, 2005
Messages
39
Hi

Sorry for my illustration, this what I hought to align the row and column to view my illustration clearly :biggrin:

_______A______________B___________C____________D______________E
1____Account_____Description____Amount1_____Amount2______Amount3
2____112323_____ AA___________$234563______$246315_____$ 123664
3____153699_____ BB___________$231223______$392789_____$ 188963
4____123896_____ CC___________$232363______$215955_____$ 122699
5
6
7
8

Few of the code I learned from here where I get the data from a text file source. And the result is the above illustration.
s=2
Select Case Trim(Mid(strline, 22, [10]))
Case "112321"
ActiveSheet.Cells(s, 1) = Mid(strline, 22, 10)
ActiveSheet.Cells(s, 2) = Mid(strline, 45, 31)
ActiveSheet.Cells(s, 3) = Mid(strline, 76, 20)
ActiveSheet.Cells(s, 4) = Mid(strline, 95, 19)
ActiveSheet.Cells(s, 5) = Right(strline, 18)
s = s + 1
so on....
Range("a" & WorksheetFunction.Max(s) + 3).Select
end select

After executing these code, the cursor is place in cell A8 on the fourth row from the last row used.

What i want to do is start again with the selected cell which is cell A8 then extract again new data from my source file. Then code again the select case.

My purpose of this is to seperate in row those different data from different souce file.

Please help me on this.

Thanks in advance.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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