+ Reply to Thread
Results 1 to 3 of 3

Can't put formula result into cell by Macro..

  1. #1
    Registered User
    Join Date
    05-19-2005
    Posts
    2

    Smile Can't put formula result into cell by Macro..

    Ok ppl. I'm kinda new to VB and i really can't understand why this code doesn't work.

    Should i be using some other functions?

    Please Login or Register  to view this content.
    If i remove that "=" in front of MID, cell gets the value but formula can't do it's job.

    If i leave it, and i have to for formula to wok, i get error '1004'

    Help

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    I think the problem is in your function argument separators. They should be commas not semicolons.

    Try this:

    Worksheets("Sheet1").Cells(2, 9).Value = "=MID(D" & row & ",1,((SEARCH("","",D" & row & ",1))-1))"

    Does that help?
    Ron

  3. #3
    Registered User
    Join Date
    05-19-2005
    Posts
    2

    Thumbs up

    Quote Originally Posted by Ron Coderre
    I think the problem is in your function argument separators. They should be commas not semicolons.

    Try this:

    Worksheets("Sheet1").Cells(2, 9).Value = "=MID(D" & row & ",1,((SEARCH("","",D" & row & ",1))-1))"

    Does that help?
    Ron
    OMG, i'm stupid


    Yes, that helps. Of all the things in the world...commas

    Thanx

+ 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