Use of Left Function in Excel VBA Macro

LEFT

We can use left function in excel & macro both. With the help of left function we extract characters from left site of a cell value or string.

हम Left Function का प्रयोग Excel & Macro दोनों में करते हैं. Left Function की मदद से हम किसी Cell की वैल्यू से Left side  से characters निकाल सकते है.

 

We have Computer value in Cell A1. We use Left(Range(“A1”).Value, 3) to pick 3 character from left side of A1 cell value and paste value in A5 cell .Try with below code.

मेरे पास Cell A1 में कंप्यूटर लिखा है. हमें इस Cell Value से left side से ३ character निकलना है और उसे A5 Cell में paste करना है. आप निचे लिखे कोड use कर सकते हैं.

Sub USE_OF_LEFT()

Range(“A5”).Value = Left(Range(“A1”).Value, 3)

End Sub


From below code we can displayed 3 character from left side of A1 Cell value in msgbox

निचे लिखे code से हम A1 Cell value के left side से ३ character को msgbox में डिस्प्ले कर सकते है.

Sub USE_OF_LEFT1()
MsgBox Left(Range(“A1”).Value, 3)
End Sub

 

Click Here Download File

 

Leave a Reply

Your email address will not be published. Required fields are marked *