+ Reply to Thread
Results 1 to 4 of 4

VBA is Adding @ Symbol to Formula, Making it Not Work!

  1. #1
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    219

    VBA is Adding @ Symbol to Formula, Making it Not Work!

    I have a formula to lookup credit card billing descriptions and find matching payee names. I have named ranges of DescriptionPhrases and matching PayeeNames. For example, the Description Phrase "EXXON" is matched with the Payee Name "ExxonMobil". This matching is necessary since each Exxon station can have a different description in the credit card billing info (such as EXXON ROSEDALE or EXXON #1234). I need any description containing "EXXON" to match to the Payee Name "ExxonMobil". So my formula checks whether each entry in DescriptionPhrases appears anywhere within the description text in the credit card billing info, and (if found) assigns the matching entry from PayeeNames.

    My formula (credit card description is in column F) is (for example):
    Please Login or Register  to view this content.
    The problem arises when I now use macro code to write this formula into a column in my data sheet:
    Please Login or Register  to view this content.
    When the macro runs, the formula that actually gets pasted in has an ADDED "@" SYMBOL:
    Please Login or Register  to view this content.
    which causes it to NOT WORK!

    Why is VBA adding this "@" symbol that is NOT in my code, and is there any way to prevent this from happening (or some other workaround)?

  2. #2
    Forum Contributor
    Join Date
    02-12-2024
    Location
    Australia
    MS-Off Ver
    365
    Posts
    131

    Re: VBA is Adding @ Symbol to Formula, Making it Not Work!

    Try using .Formula2R1C1

  3. #3
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    219

    Re: VBA is Adding @ Symbol to Formula, Making it Not Work!

    Quote Originally Posted by Eeza Goodun View Post
    Try using .Formula2R1C1
    THANK YOU!! That worked!

  4. #4
    Forum Contributor
    Join Date
    02-12-2024
    Location
    Australia
    MS-Off Ver
    365
    Posts
    131

    Re: VBA is Adding @ Symbol to Formula, Making it Not Work!

    No problems. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Making a formula automatically work
    By KAYLO in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-12-2016, 11:37 AM
  2. making a formula work on all tabs
    By stephme55 in forum Excel General
    Replies: 2
    Last Post: 06-02-2016, 01:19 AM
  3. problems making this IF formula work
    By wallstreetballa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-25-2013, 01:46 AM
  4. Adding/Removing Column to all sheets & making formulas work
    By gregal0711 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2012, 05:09 PM
  5. Making a formula work across each row!
    By ivygivy in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 09-19-2009, 09:44 PM
  6. Making a textbox work out a formula
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2009, 03:35 PM
  7. Making this formula work
    By Kleev in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-14-2005, 08:45 PM

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