+ Reply to Thread
Results 1 to 7 of 7

convert an instruction in vba

  1. #1
    Registered User
    Join Date
    11-22-2006
    Posts
    14

    convert an instruction in vba

    Hello i have try to convert this instruction
    =IF(ISNUMBER(FIND("\",F1)),MID(F1,1,(FIND("\",F1)-1)),F1)

    in vba ...
    I want to format a sheet that contain ""\""and evrything after
    this command work fine for me but i want to use it in a vba sub() that i will create

    but so far ... i had no chance
    can someone help me or give me some clue how i can do that

    thank you
    have a great day

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Something along these lines ...

    Please Login or Register  to view this content.
    HTH
    Carim

  3. #3
    Registered User
    Join Date
    11-22-2006
    Posts
    14

    thank's

    i will try that tomorrow ....run out of time at work .....i will keep you in touch

    thank's again

  4. #4
    Registered User
    Join Date
    11-22-2006
    Posts
    14

    OK I have try it but......

    i think vba don't like the "" after in equation ????

    when i try to run the sub ()
    it stop on this instruction
    i = InStr(1, ActiveCell.Offset(0, -1).Value, "\")

    pop windows :
    application defined or object-defined error

    and when i bring the cursor on this instruction it say's
    i = InStr(1, ActiveCell.Offset(0, -1).Value=<application defined or object-defined error>

    so again my limited acknowledge stop me here !!.

    so i'm in the obligation to ask you again ....help me please

    thank you

  5. #5
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    As you asked for a replicate ...
    Macro needs an input in cell F1 in order to produce result in cell G1 ...

    HTH
    Carim

  6. #6
    Registered User
    Join Date
    11-22-2006
    Posts
    14

    Ok now it's work

    I told you that my skill was limited .....with your last reply you have light up my .....head


    now it's work

    thank you

    i might have another question i will make a new post

    thank's again

  7. #7
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Glad your problem is fixed.

    Thanks for the feedback

    Carim

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1