+ Reply to Thread
Results 1 to 5 of 5

Formula Error

  1. #1
    Registered User
    Join Date
    06-21-2010
    Location
    Suffolk, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Formula Error

    Somebody provided me this lovely formula for my Excel VB code:

    MATCH(R[]C1&R[-1]C2

    however it currently shows the formula as MATCH($A2&$B1 but cell B1 should read $B$1.

    What do I change in the formula to make cell B1 a fixed cell reference?

    Just in case it makes a difference the whole formula is:
    Range("B2").FormulaArray = _
    "=IF(ISNA(INDEX(General!R2C6:R" & LR & "C6,MATCH(R[]C1&R[-1]C2,General!R2C1:R" & LR & "C1&LEFT(General!R2C13:R" & LR & "C13,2),0))),"""",(INDEX(General!R2C6:R" & LR & "C6,MATCH(R[]C1&R[-1]C2,General!R2C1:R" & LR & "C1&LEFT(General!R2C13:R" & LR & "C13,2),0))))"

  2. #2
    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,926

    Re: Formula Error

    This looks to me to be VBA related, so I will move it to that forum for you
    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

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Formula Error

    Change this...
    MATCH(R[]C1&R[-1]C2

    To this...
    MATCH(R[]C1&R1C2
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    06-21-2010
    Location
    Suffolk, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Formula Error

    Thank you that worked a treat!

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Formula Error

    BradleyS,

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. [SOLVED] Inputbox error message. Formula you typed contains an error.
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-09-2013, 02:25 PM
  2. Excel 2007 : Formula error:bring up an #VALUE! Error.
    By burner007 in forum Excel General
    Replies: 3
    Last Post: 06-20-2011, 06:10 AM
  3. Formula Error-Error Message
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2006, 04:15 PM
  4. Replies: 4
    Last Post: 03-24-2006, 07:20 AM
  5. Error values:DIV/0! error in SumProduct formula with no division
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM

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