The following does what you describe:

Public Function FMT(s1 As String, s2 As String, s3 As String, s4 As String)
As String
    s1 = Format(s1, "#")
    s2 = Format(s2, "0#")
    s3 = Format(s3, "0#")
    s4 = Format(s4, "###")

    FMT = s1 & "." & s2 & "." & s3 & "." & s4
End Function

s1,s2,s3 and s4 are the four values to be separated by periods.

Call as:  =FMT(A1,B2, C5, E6) assuming the four numeric values are in the
respective cells.

If you have any questions let me know.

Tom

On Wed, Mar 18, 2009 at 4:35 AM, Abdul Hakim <abdulhakimk...@gmail.com>wrote:

>
> Hi All
>
> PROBLEM:-
> eg.  I want to insert 1.01.01.830 based on some other columns
> conditions, automatic  not manual.can any body help me to sort the
> problem.
> * Line Item code I want to store into some other excel sheets or same
> sheets.
> Please help me.
>
>
>
>
> Regards,
> Abdul Hakim
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to