+ Reply to Thread
Results 1 to 5 of 5

Adding Associated Column to Index/Count IF

  1. #1
    Registered User
    Join Date
    04-05-2014
    Location
    TN
    MS-Off Ver
    Excel 2003
    Posts
    7

    Adding Associated Column to Index/Count IF

    Hello! I was wondering if anyone can help me with this - I think it is simple and I am just blind in the brain this morning.

    (Details changed for simplicity)

    I have six columns, A:F

    Column A is a numerical value
    Column B is a text value
    Column C is a text value

    e.g. A|B|C

    2|Cups|Flour

    1|Tablespoon|Sugar

    3|Cups|Flour

    Column D uses SUMIF checking Column C for the value in Column F, and summing column A in the case of a match
    =SUMIF($C$2:$C$546,F2,$A$2:$A546 )

    Column E ????????

    Column F is an index used to consolidate the data in Column C
    =INDEX($C$2:$C$546,MATCH(0,INDEX(COUNTIF($F$1:F1,$C$2:$C$546),0,0),0))

    Which outputs:

    5| |Flour

    I am trying to figure out a way that the above example outputs:

    5|Cups|Flour

    Values should be consistent to the user, but not ever user may choose to use Cups for Flour, so I can't use a black and white IF statement - I Think I need something that checks Column C for the value in a cell in Column F2, F3..., and, outputs Column B from the any of the* found match's row to Column E2, E3...

    *again, this shouldn't matter as it should be consistent within the sheet.

    Seamless/Easy compatibility is required, and I am trying to avoid macros - this is the last bullet I have to dodge I think for the latter!

    I could be going about it all wrong - any help would be much appreciated!

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Adding Associated Column to Index/Count IF

    This is what I undestand:
    * F column is list of unique distinc value from C column
    * D2 is totalling value from A column for F2 value
    * E2 is first match of F2 in C column
    If yes, F2 = INDEX($B2$B546,MATCH(F2,$C2$C546,0))
    Quang PT

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

    Re: Adding Associated Column to Index/Count IF

    Quote Originally Posted by bebo021999 View Post
    F2 = INDEX($B2$B546,MATCH(F2,$C2$C546,0))
    Looks like you forgot to include the colon for the range references!

    If you enter that formula in F2 you'll get a circular reference warning.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Adding Associated Column to Index/Count IF

    Thanks Tony.
    In E2:
    = INDEX($B$2:$B$546,MATCH(F2,$C$2:$C$546,0))
    Though, not sure it helps

  5. #5
    Registered User
    Join Date
    04-05-2014
    Location
    TN
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Adding Associated Column to Index/Count IF

    bebo, Tony - Thank you so much!

    "Look at Column D, dummy!" would have also been acceptable - I was definitely in that spot where I was blind to the solution, it would have taken me forever to get out of it without you two - appreciate it!

+ 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. Get non-empty cells count and index for some column in 3 worksheets?
    By nickxtsui in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2013, 08:57 PM
  2. [SOLVED] Using Index and indirect to count number of 1's in a column of interest.
    By ad9051 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-13-2013, 06:09 AM
  3. Replies: 1
    Last Post: 02-12-2013, 11:02 PM
  4. [SOLVED] VBA for creating Index-Match every 2 rows where INDEX refer to a different column per row
    By bisaya789 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 03:46 AM
  5. Replies: 11
    Last Post: 11-05-2011, 12:34 PM

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