Read data from text file to excel using VBA

mohd_arastu

New Member
Joined
Feb 21, 2012
Messages
19
Dear Frend

I have a text file(Name.txt) having following data and i want to copy colored data in to excel sheet in different columns


B E A M N O. 1 D E S I G N R E S U L T S
M25 Fe500 (Main) Fe500 (Sec.)
LENGTH: 3500.0 mm SIZE: 230.0 mm X 450.0 mm COVER: 25.0 mm

SUMMARY OF REINF. AREA (Sq.mm)
----------------------------------------------------------------------------
SECTION 0.0 mm 875.0 mm 1750.0 mm 2625.0 mm 3500.0 mm
----------------------------------------------------------------------------
TOP 412.73 163.83 0.00 163.83 428.33
REINF. (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm)
BOTTOM 319.96 178.42 163.83 163.83 193.33
REINF. (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm)
----------------------------------------------------------------------------

SUMMARY OF PROVIDED REINF. AREA
----------------------------------------------------------------------------
SECTION 0.0 mm 875.0 mm 1750.0 mm 2625.0 mm 3500.0 mm
----------------------------------------------------------------------------
TOP 4-12í 3-12í 2-12í 3-12í 4-12í
REINF. 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s)
BOTTOM 3-12í 3-12í 3-12í 3-12í 3-12í
REINF. 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s)
SHEAR 2 legged 8í 2 legged 8í 2 legged 8í 2 legged 8í 2 legged 8í
REINF. @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c
----------------------------------------------------------------------------

SHEAR DESIGN RESULTS AT DISTANCE d (EFFECTIVE DEPTH) FROM FACE OF THE SUPPORT
SHEAR DESIGN RESULTS AT 565.0 mm AWAY FROM START SUPPORT
VY = 47.14 MX = 0.20 LD= 9
Provide 2 Legged 8í @ 140 mm c/c
SHEAR DESIGN RESULTS AT 565.0 mm AWAY FROM END SUPPORT
VY = -50.28 MX = 0.19 LD= 12
Provide 2 Legged 8í @ 140 mm c/c
============================================================================

============================================================================
B E A M N O. 2 D E S I G N R E S U L T S
M25 Fe500 (Main) Fe500 (Sec.)
LENGTH: 6000.0 mm SIZE: 230.0 mm X 450.0 mm COVER: 25.0 mm
STAAD SPACE -- PAGE NO. 82

SUMMARY OF REINF. AREA (Sq.mm)
----------------------------------------------------------------------------
SECTION 0.0 mm 1500.0 mm 3000.0 mm 4500.0 mm 6000.0 mm
----------------------------------------------------------------------------
TOP 496.46 164.22 164.22 164.22 486.82
REINF. (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm)
BOTTOM 188.47 163.83 163.83 163.83 0.00
REINF. (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm)
----------------------------------------------------------------------------

SUMMARY OF PROVIDED REINF. AREA
----------------------------------------------------------------------------
SECTION 0.0 mm 1500.0 mm 3000.0 mm 4500.0 mm 6000.0 mm
----------------------------------------------------------------------------
TOP 7-10í 3-10í 3-10í 3-10í 7-10í
REINF. 2 layer(s) 1 layer(s) 1 layer(s) 1 layer(s) 2 layer(s)
BOTTOM 3-12í 3-12í 3-12í 3-12í 2-12í
REINF. 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s)
SHEAR 2 legged 8í 2 legged 8í 2 legged 8í 2 legged 8í 2 legged 8í
REINF. @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c
----------------------------------------------------------------------------

SHEAR DESIGN RESULTS AT DISTANCE d (EFFECTIVE DEPTH) FROM FACE OF THE SUPPORT
SHEAR DESIGN RESULTS AT 565.0 mm AWAY FROM START SUPPORT
VY = 49.96 MX = -0.11 LD= 14
Provide 2 Legged 8í @ 140 mm c/c
SHEAR DESIGN RESULTS AT 565.0 mm AWAY FROM END SUPPORT
VY = -48.36 MX = -0.12 LD= 7
Provide 2 Legged 8í @ 140 mm c/c
============================================================================

============================================================================
B E A M N O. 3 D E S I G N R E S U L T S
M25 Fe500 (Main) Fe500 (Sec.)
LENGTH: 3500.0 mm SIZE: 230.0 mm X 450.0 mm COVER: 25.0 mm

SUMMARY OF REINF. AREA (Sq.mm)
----------------------------------------------------------------------------
SECTION 0.0 mm 875.0 mm 1750.0 mm 2625.0 mm 3500.0 mm
----------------------------------------------------------------------------
TOP 383.59 178.23 164.22 164.22 326.76
REINF. (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm)
BOTTOM 347.39 172.11 164.22 166.31 334.52
REINF. (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm) (Sq. mm)
----------------------------------------------------------------------------
STAAD SPACE -- PAGE NO. 83

SUMMARY OF PROVIDED REINF. AREA
----------------------------------------------------------------------------
SECTION 0.0 mm 875.0 mm 1750.0 mm 2625.0 mm 3500.0 mm
----------------------------------------------------------------------------
TOP 5-10í 3-10í 3-10í 3-10í 5-10í
REINF. 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s)
BOTTOM 5-10í 3-10í 3-10í 3-10í 5-10í
REINF. 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s) 1 layer(s)
SHEAR 2 legged 8í 2 legged 8í 2 legged 8í 2 legged 8í 2 legged 8í
REINF. @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c @ 140 mm c/c
----------------------------------------------------------------------------

SHEAR DESIGN RESULTS AT DISTANCE d (EFFECTIVE DEPTH) FROM FACE OF THE SUPPORT
SHEAR DESIGN RESULTS AT 565.0 mm AWAY FROM START SUPPORT
VY = 37.54 MX = 0.01 LD= 9
Provide 2 Legged 8í @ 140 mm c/c
SHEAR DESIGN RESULTS AT 565.0 mm AWAY FROM END SUPPORT
VY = -34.37 MX = 0.01 LD= 12
Provide 2 Legged 8í @ 140 mm c/c
============================================================================

row 1: data of beam 1
row 2: data of beam 2
row 3: data of beam 3 ans soon...


thanks in advance
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Why not invest in showing us what
row 1: data of beam 1

should reallyactually LOOK LIKE afterwards!
 
Upvote 0
i want this data in different column for each beam

B E A M N O. 1 25 500 3500 230 450 412.73 163.83 0.00 163.83 428.33 319.96 178.42 163.83 163.83 193.33
 
Upvote 0
This is quite a challenge for me, and I am trying to tackle it (Thanks)!!
I will be working on this all today, reporting back when I've got it for you.

Likely, someone else will give you the answer before me. But I'm gonna
stay on it till it's done, rest assured.

Jim
 
Upvote 0
mohd,

Well, I got it!!!!!

I won't tell you how long I worked on it, but through BRUTE-FORCE I got
your First Block Alone to work -- then I copied and Pasted in your other 2 Blocks individually and re-ran the macro. All 3 worked, without error.

If you'd like I can send you (via pm this site) the file. Or, provide your e-mail address and I will do the same.

Jim May
 
Upvote 0

Forum statistics

Threads
1,215,558
Messages
6,125,507
Members
449,236
Latest member
Afua

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