+ Reply to Thread
Results 1 to 6 of 6

How do I convert text ie apple to string "apple" in excel or VBA?

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    How do I convert text ie apple to string "apple" in excel or VBA?

    How do I convert text ie apple to string "apple" in excel or VBA?
    I need the text as a string to use MATCH. I have looked everywhere but cant find a way.

    for example: if you put kk in cell A1, pp in cell B1 and rr in cell C1 and then in some
    other cell you put =MATCH(kk,A1:C1) it will not work you need to
    put =MATCH("kk",A1:C1)

    Also if you want to convert text to string it will not work to put for
    example ="a1". if you manually type =MATCH("kk",A1:C1) it is ok but since
    the code run in VBA I cant type this manually hence I need to convert all
    text elements in a range to strings. Complicated!
    Last edited by dav_mark; 04-21-2013 at 02:31 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How do I convert text ie apple to string "apple" in excel or VBA?

    Hi dav_mark

    Welcome to the Forum!

    If I understand your question, try this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How do I convert text ie apple to string "apple" in excel or VBA?

    Strange, exact same question but under a different name here.
    If posting code please use code tags, see here.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How do I convert text ie apple to string "apple" in excel or VBA?

    @Norie

    Wow, those two different persons must have amazing karma...

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: How do I convert text ie apple to string "apple" in excel or VBA?

    I'm afraid your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    04-17-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: How do I convert text ie apple to string "apple" in excel or VBA?


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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