+ Reply to Thread
Results 1 to 8 of 8

Vlookups and array formulas

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Vlookups and array formulas

    Hello I have two columns in excel:
    Column A (A2:A56) contains contract codes values
    Column B(b2:b56) contains renewed contract codes values

    I would like to count the number of contract codes values that have been renewed (matching Column B with Column A). I would like to achieve that without adding a column (altering my structure)

    Is it possible to achieve that by using array formulas

    (If I add a column and I perform a vlookup then I can straightforward count the number of matches)

    My Array Formula looks as follows (My aim is to count the number of cells in column B3:B9 that do not return an error(have a match) with a cell in column A3:A9

    Please Login or Register  to view this content.
    To clarify please see attachment
    Many Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Vlookups and array formulas

    Could you not count non_NULL ??

    =COUNTIF(Table1[RENEWAL OF CONTRACT CODE],"<>NULL")
    Last edited by JohnTopley; 09-27-2016 at 11:58 AM.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Vlookups and array formulas

    =SUMPRODUCT(--(COUNTIF(Table1[CONTRACT CODE],Table1[RENEWAL OF CONTRACT CODE])>0))
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Vlookups and array formulas

    Try this ...

    =SUM(--(COUNTIF(Table1[CONTRACT CODE],Table1[RENEWAL OF CONTRACT CODE])>0))

  5. #5
    Registered User
    Join Date
    10-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Vlookups and array formulas

    Hello,
    Thanks for your reply
    It does not work as COUNTIFS cannot compare two columns
    The criteria cannot be a column should be a value
    My challenge is to be able to formulate an array formula that vlookups every cell in CONTRACT CODE again the whole column of RENEWED CONTRACT CODE and returns 1 if found 0 if error. Subsequently it sums up the "virtual array" of 1s and 0s
    Regards
    Dora

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Vlookups and array formulas

    Did you try Daffodil11's formula: it returns a result of 3.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Vlookups and array formulas

    Maybe this...

    =SUMPRODUCT(--ISNUMBER(MATCH(Table1[RENEWAL OF CONTRACT CODE],Table1[CONTRACT CODE],0)))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Registered User
    Join Date
    10-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Vlookups and array formulas

    Thanks. Apologies. Daffodil11's formula works

+ 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. A maco makes all my Vlookups and formulas disappear!!!!
    By marvinabou7890 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-11-2016, 08:20 PM
  2. Replies: 3
    Last Post: 01-01-2016, 03:44 PM
  3. [SOLVED] VLOOKUPS, MID, AND FIND Together Returning Last Cell in Array
    By Wade112 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-07-2015, 02:11 AM
  4. Ctrl+Shift+Enter (CSE) array formulas in VBA using differing formulas
    By officeguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2012, 04:31 PM
  5. Replies: 6
    Last Post: 12-30-2008, 06:52 AM
  6. [SOLVED] Vlookups array function by Alan Beban
    By FWA in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2005, 10:06 AM
  7. [SOLVED] Vlookups array function by Alan Beban
    By falvey3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-18-2005, 10:06 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