Results 1 to 6 of 6

VBA Formula that require Control+Shift+Enter

Threaded View

RxMiller VBA Formula that require... 05-26-2009, 01:11 PM
RxMiller Re: VBA Formula that require... 05-26-2009, 01:26 PM
DonkeyOte Re: VBA Formula that require... 05-26-2009, 01:37 PM
RxMiller Re: VBA Formula that require... 05-26-2009, 02:29 PM
hoffey Re: VBA Formula that require... 08-19-2009, 12:01 PM
shg Re: VBA Formula that require... 08-19-2009, 12:06 PM
  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Vail, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    83

    Red face VBA Formula that require Control+Shift+Enter

    VBA automation -
    Excel added the formula - but they all return "Not Found"
    After the VBA automation - I visit each cell, see the formula is correct and then press Control +Shift + Enter; then the correct value displays! Of course, the curly brackets also appear in the formula bar.

    In VBA I tried to use the:
    objXL.ActiveCell.FormulaArray = "=IF(ISERROR(INDEX(PositionDataSell!$T$2:$T$505,MATCH(" & lngContractID & "&" & strQuote & strConCat .....
    The Excel Formula bar for the cell is just empty (blank)

    Using only the Formula property:
    objXL.ActiveCell.Formula = "=IF(ISERROR(INDEX(PositionDataSell!$T$2:$T$505,MATCH(" & lngContractID & "&" & strQuote & strConCat .....

    The correct formula is created in each cell, but...
    Until I visit that cell and use the Control+Shift+Enter - the lookup will not work. It is proof that the right formula is there, without the curly brakcets.

    In Excel - my vba code successfully constructs these formulas:
    In essence: It checks for an error and prints "Not Found" if no match is found in the check. It test for two values in a row - matches them to two columns on a row in another worksheet, and returns a third value for the matches of the same row.

    =IF(ISERROR(INDEX(PositionDataSell!$T$2:$T$505,MATCH(73945&"@"&-10000,( PositionDataSell!$D$2:$D$505)&"@"&(PositionDataSell!$S$2:$S$505),0))),"Not Found", INDEX(PositionDataSell!$T$2:$T$505,MATCH(73945&"@"&-10000,( PositionDataSell!$D$2:$D$505) & "@" & (PositionDataSell!$S$2:$S$505),0)))
    and, maybe I also need to think of a way to prevent the users from visiting a cell as well
    Maybe I hide the cells with the actual formula and display a cell with the actual value of the cell with a formula?
    Last edited by RxMiller; 05-26-2009 at 02:29 PM. Reason: speling (LOL)

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