+ Reply to Thread
Results 1 to 18 of 18

I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

  1. #1
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    In using the following formula:

    =ADDRESS(MATCH($A26&13,[transactions.xlsx]payments!$A2:$A2000&[transactions.xlsx]payments!$B2:$B2000),3,4,1,"[transactions.xlsx]payments")

    I get #value returned. When doing the evaluate it shows the value from the MATCH as returning the #value to the field. I cannot figure what is causing this as when I evaluate the first two fields in the MATCH formula they appear to look ok... Ideas?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    The use of the & operator in $A2&13 creates a TEXT string, even if $A2 is numeric as is 13. You would need to convert that string BACK into a number, perhaps by: ($A2&13)+0

    Give that a try.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    Quote Originally Posted by JBeaucaire View Post
    The use of the & operator in $A2&13 creates a TEXT string, even if $A2 is numeric as is 13. You would need to convert that string BACK into a number, perhaps by: ($A2&13)+0

    Give that a try.
    Thanks for the reply. I tried this but can't seem to figure out how. The formula I am using is:
    ADDRESS(MATCH($A26&13,[transactions.xlsx]payments!$A2:$A2000&[transactions.xlsx]payments!$B2:$B2000),3,4,1,"[transactions.xlsx]payments")

    A26 of the current worksheet is actually from the current row and reflects the row referenced, i.e. each row contains the same formula. payments are the workbook/worksheet where the payments are located. Column A contains units (apartment numbers, i.e. 23A, 23B, etc) and oolumn B contains year, 9,10,11... Column 3 (or C) of payments contains the date i am attempting to locate.

    I'm trying to locate the last payment made for a year (i.e. 13) as the value of this field.

    Thank you for your interest...

  4. #4
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    As additional information:
    When I look at the Functions Arguments window the results are almost correct. the sheet_text value as the last argument in the ADDRESS function shows "[transactions.xlsx]payments!C574". I do know if a problem exists with the $ missing or how to get it in the argument.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    Hi,

    I'm not sure about this part of your formula:

    MATCH($A26&13,[transactions.xlsx]payments!$A2:$A2000&[transactions.xlsx]payments!$B2:$B2000)

    Firstly, unless this is entered as an array formula, it will not do as you wish. Secondly, are you trying to find an exact match? If so, you have omitted the match_type parameter.

    Perhaps this is what you meant (I have used an INDEX to make it non-array):

    =ADDRESS(MATCH($A26&13,INDEX([transactions.xlsx]payments!$A2:$A2000&[transactions.xlsx]payments!$B2:$B2000,,),0),3,4,1,"[transactions.xlsx]payments")

    though I can't be sure without seeing an actual sheet.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    Thanks again... the actual results display in the cell as [transactions.xlsx]payments!$C$571 not the value of same. and the 571 is 4 cells less than the actual one i'm looking for (575). any change i could share the file with you so you might see what i'm trying to do?

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    If it's the actual cell value that you're wishing to return, why then are you using the ADDRESS function? Sounds like INDEX is what you require.

    I think this would be a good time for you to post a workbook.

    Regards

  8. #8
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    Another perspective: I am trying to locate the latest payment date within an account/year.

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    That's all very well, but without seeing an actual spreadsheet it's not going to be possible to be sure of a correct solution.

    Regards

  10. #10
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    ok, here is a sample of data. using a reference of 21A13 I want to select the highest date within year 13 for act 21A, i.e. 11/06/13.

    21A 12 03/01/12
    21A 12 03/30/12
    21A 12 05/01/12
    21A 12 05/10/12
    21A 13 05/01/12
    21A 13 05/01/13
    21A 13 05/01/13
    21A 13 11/06/13
    21A 14 11/27/13
    21B 07 05/13/08
    21B 07 06/24/08

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    I meant an actual spreadsheet, but anyway, assuming that data is in A1:C11:

    =MAX(INDEX((A1:A11="21A")*(B1:B11=13)*C1:C11,,))

    Regards

  12. #12
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    thanks, i'll try it...

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    array entered
    =MAX(IF((A1:A11="21a")*(B1:B11=13),C1:C11))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  14. #14
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    @martindwilson

    I must be dreaming! You suggesting an array formula when there's a perfectly good non-array version??

    Unheard of!!

  15. #15
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    i know ,i did it then thought hmmmm ..then to compound it i saw your post lol

  16. #16
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    EXCELLENT! Thank you all....

  17. #17
    Registered User
    Join Date
    12-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    Well, ya'll are way beyond me... But I sure do appreciate your help!

  18. #18
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I'm trying to MATCH on 2 columns using & and place value using ADDRESS in field.

    I've marked this thread as SOLVED for you.
    Next time, select Thread Tools from the links above to mark a thread as SOLVED. Thanks.

+ 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] match 2 columns in the 1st place and then 2 other columns in the 2nd place
    By flunzy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-28-2013, 07:37 PM
  2. Partial IP Address Range Match Between 2 Columns
    By RickT in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-06-2013, 11:40 AM
  3. Replies: 2
    Last Post: 10-11-2012, 08:05 AM
  4. [SOLVED] How to split an address field into two columns
    By gmoexcel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2006, 09:56 AM
  5. How to Reference a Web Query's Address Field to an external field?
    By Nivled in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-21-2005, 07:10 AM

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