Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Vba

Status
Not open for further replies.

NaWin55

Mechanical
Mar 21, 2020
97
IN
Hi all
I want to create a macro which extracts first 2 or 3 values from a cell
and prints those extracted values in to any cells

here is the macro i have written
but i cant print extracted values to adjacent cells

Sub ExcelMain()
Excel.Application.ScreenUpdating = False

Dim i As Integer
Dim a As Long
For i = 1 To 5
a = Range("E5").Offset(i, 0).Value
a = Left(a, 2)
Next

End Sub

ExcelError_be0phm.jpg


thank you
 
Replies continue below

Recommended for you

I fail to see a CATIA connection?...
anyways, before the next statement, insert this line:
Range("B2").Offset(i, 1).Value = a

regards,
LWolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top