+ Reply to Thread
Results 1 to 12 of 12

Excel 2007 : OFFSET Match formula need help

  1. #1
    Registered User
    Join Date
    12-23-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    14

    Smile OFFSET Match formula need help

    hi all,
    I am building SS in 2007 and require it to work in 2003.
    I have two problems,
    1. the following formula for returning a blank cell when N/A only works in 2003 and not in 2007.

    =IF(OR(I3="",J3=""),"",OFFSET('Points Data'!$A$2,MATCH(Drivers!J3,'Points Data'!$B$2:$AM$2),MATCH(Drivers!I3,'Points Data'!$A$3:$A$37))

    thanks all

    James

    appreciate any speedy repsonses!!!
    Last edited by feno1; 12-24-2010 at 01:15 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: OFFSET Match formula need help

    It works OK for me in both ... in that it returns a blank. I have no test data and no plans to produce any so I can't check it any further. It was missing a closing bracket which Excel picked up in both versions.

    In what way doesn't it work in 2007 when it works in 2003?

    Post a sample workbook in both versions of Excel to demonstrate the problem

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-23-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: OFFSET Match formula need help

    so in 2007 it still spits out NA but it works and spits out a blank in2003.
    sorry you're right formula was missing closing bracket
    =IF(OR(I3="",J3=""),"",OFFSET('Points Data'!$A$2,MATCH(Drivers!J3,'Points Data'!$B$2:$AM$2),MATCH(Drivers!I3,'Points Data'!$A$3:$A$37)))
    attached is the 2007 version it doesnt work in
    Attached Files Attached Files
    Last edited by feno1; 12-23-2010 at 04:44 AM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: OFFSET Match formula need help

    Look closely at the formulae ... they're not the same.

    Clue: check the row number.

    Regards

  5. #5
    Registered User
    Join Date
    12-23-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: OFFSET Match formula need help

    Okay

    I can see what you are looking at

    row 3 is the formula I am trying to correct, row 4 is where I havent added the blank correction yet.


    so if you deleted the number 1 in J3 the formula in K3 will show N/A I want it to show "" (no value) when J3 is blank.

    thanks again for your brain work, I've been on this for a few hours now trying to work out how to do it

    James

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: OFFSET Match formula need help

    You have this "=IF(OR(I3="",J3=""),..." on Row 4.

    Look at Row 3

    Regards

  7. #7
    Registered User
    Join Date
    12-23-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: OFFSET Match formula need help

    yep
    so if you delete row 4, forget it ever existed and delete cell J3 on row 3, can you get the formula in row K3 to remain blank rather than N/A?
    Last edited by feno1; 12-23-2010 at 05:39 AM.

  8. #8
    Registered User
    Join Date
    12-23-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: OFFSET Match formula need help

    so lets start this again,
    apologies on mis communication.
    In the attached I want the formula in celll K3 to return

    1. nothing when cell J3 is not populated, at the moment it returns N/A
    2. cross value of the 'points data' value corresponding with cell I3 and J3 when a value is in J3

    thanks
    Attached Files Attached Files

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: OFFSET Match formula need help

    J3 does not contain null/nothing; it contains a space. Hence the OR condition is FALSE and the two MATCHes are evaluated. The first one fails with #N/A so the overall result is #N/A.

    You could use the following formula to cater for space(s) in cells I3 or J3.

    =IF(OR(TRIM(I3)="",TRIM(J3)=""),"",OFFSET('Points Data'!$A$2,MATCH(Drivers!J3,'Points Data'!$B$2:$AM$2),MATCH(Drivers!I3,'Points Data'!$A$3:$A$37)))

    You don't actually need the MATCHes. The following formula gives the same result:

    =IF(OR(TRIM(I3)="",TRIM(J3)=""),"",OFFSET('Points Data'!$A$2,J3,I3))

    Note the TRIM function is used to remove space(s) in both formulae.

    I'm guessing the second will be quicker to evaluate.

    Regards

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: OFFSET Match formula need help

    Forgot - the evidence:

    HTML Code: 
    Regards

  11. #11
    Registered User
    Join Date
    12-23-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: OFFSET Match formula need help

    Thank you Sir,
    you are indeed a gentleman and a scholar.
    all fixed, brilliant!

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: OFFSET Match formula need help

    You're welcome. Thanks for the feedback.

+ 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