Use of Right Function in Excel VBA Macro

RIGHT

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

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

 

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

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

Sub USE_OF_RIGHT()

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

End Sub


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

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

Sub USE_OF_RIGHT1()
MsgBox Right(Range(“A1”).Value, 3)
End Sub

 

Click Here Download File

2 comments

Leave a Reply

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