Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep 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
Joined
Mar 21, 2020
Messages
98
Location
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
 
I fail to see a CATIA connection?...
anyways, before the next statement, insert this line:
Range("B2").Offset(i, 1).Value = a

regards,
LWolf
 
Thank you Lwolf
it worked
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top