Hi Guys,
Am new to this forum.
Its my first post. Kindly help me out.
I need to select the column with complete or partial name known and to format it to 'text' or 'currency'.. How can i write a macro for this ?
Below code works to some extent.. but need not select and format complete column, need it only to do till null cells are identified..
Also mentioned the details of formatting i need in the attachment.. Thanks a lot guys !!
Sub Macro3()
Dim i As Integer, cfindmacro As Range
Set cfindmacro = ActiveSheet.UsedRange.Cells.Find(what:="name", lookat:=xlWhole)
i = cfindmacro.Column
Columns(i).NumberFormat = "000-000-000"
Set cfindmacro = ActiveSheet.UsedRange.Cells.Find(what:="salary", lookat:=xlWhole)
i = cfindmacro.Column
Columns(i).NumberFormat = "$000,000,00#.00"
End Sub
Bookmarks