+ Reply to Thread
Results 1 to 12 of 12

Help required identifying the first time data is mentioned in 2 columns

  1. #1
    Guest
    Join Date
    12-15-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    7

    Help required identifying the first time data is mentioned in 2 columns

    Hey guys,

    I'm looking for some help in excel (2007).

    I have 2 columns: Column A and Column B.

    For the project I'm working on, both columns have already been coded accordingly such that they spit out either of the three words: "Miss" or "Buying" or "Selling."
    As you read from left to right there are only 3 options in my results (one word per cell):

    MISS MISS
    BUYING MISS
    MISS SELLING

    I am only interested in the "buying" or "selling" terms. And so my question is: how can I achieve an output (in a new separate cell) - reading from left to right and then down to the next row - which term (between 'buying' and 'selling') appears first?

    Just for further clarification, I've provided an example (one of hundreds of tables I'm trying to compute!) below. Here the answer will obviously be that "Selling" appears first.


    1 Miss Miss
    2 Miss Selling
    3 Miss Miss
    4 Buying Miss
    5 Buying Miss
    6 Miss Selling
    7 Miss Selling
    8 Buying Miss
    9 Miss Selling
    10 Miss Selling
    11 Buying Miss
    12 Miss Selling

    Any help would be really appreciated! Thanks in advance!
    Last edited by Yas108; 12-15-2015 at 10:28 PM.

  2. #2
    Guest
    Join Date
    12-15-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    7

    Re: Help required identifying the first time data is mentioned in 2 columns

    Problem.jpg

    Here's an image from word just showing the above in a table (formatting got messed up as i submitted it)

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help required identifying the first time data is mentioned in 2 columns

    Withdrawn by FR.
    Dave

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Help required identifying the first time data is mentioned in 2 columns

    Hi,

    Can you please post an example file in excel format? See the below URL for help on how to upload a file.

    http://www.excelforum.com/members/da...ch-a-file.html

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help required identifying the first time data is mentioned in 2 columns

    See if this does what you want. These are two array-entered formulas entered in C1 and filled across and C2 and filled across. They identify first occurrence row in each column and whether Sell / Buy.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    Row\Col
    A
    B
    C
    D
    1
    Miss Miss
    4
    5
    2
    Miss Miss Selling Buying
    3
    Miss Miss
    4
    Selling Miss In C1 : =MIN(MATCH("Selling",A$1:A$21,0),MATCH("Buying",A$1:A$21,0))
    5
    Miss Buying In C2 : =INDEX(A$1:A$21,MIN(MATCH("Selling",A$1:A$21,0),MATCH("Buying",A$1:A$21,0)))
    6
    Miss Miss
    7
    Miss Buying
    8
    Miss Miss
    9
    Miss Miss
    10
    Buying Miss
    11
    Miss Miss
    12
    Miss Miss
    13
    Miss Miss
    14
    Buying Selling
    15
    Miss Selling
    16
    Buying Miss
    17
    Miss Selling
    18
    Miss Miss
    19
    Miss Miss
    20
    Miss Miss
    21
    Selling Selling

  6. #6
    Guest
    Join Date
    12-15-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    7

    Re: Help required identifying the first time data is mentioned in 2 columns

    Thanks for trying to help.

    This is one example of what i'm trying to do.
    Attached Files Attached Files

  7. #7
    Guest
    Join Date
    12-15-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    7

    Re: Help required identifying the first time data is mentioned in 2 columns

    Hi FlameRetired

    >>
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter

    I'm not sure i understand this step. I've inputted the formulas you've coded and changed the variables accordingly to corresponding numbers on the excel sheet but am only getting errors. Can you show it to me on the excel file i just uploaded?
    Last edited by Yas108; 12-16-2015 at 01:41 AM.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help required identifying the first time data is mentioned in 2 columns

    On the file you just uploaded my formula only partially works.

    My formula needs two columns to display output as in the grid I posted.

    I am befuddled on how to handle all of this in one cell; not having any success. I am going to have to sleep on this one.

    And yes, that formula will return errors.

  9. #9
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Help required identifying the first time data is mentioned in 2 columns

    Hi,

    See the attached file.

    I have added a helper column (L) to merge columns I & J and used INDEX MATCH for obtaining the initial match.

    Try the following in L1:

    =IF(OR(I1=0,I1="Miss"),"",I1)&IF(OR(J1=0,J1="Miss"),"",J1)

    In K24:
    {=INDEX(L1:L24,MATCH(TRUE,L1:L24<>"",0),0)}

    Please note that this is an array formula and needs to be confirmed by pressing CTRL+SHIFT+ENTER

    See the following URL for further help on array formulas.

    https://support.office.com/en-us/art...2-ecfd5caa57c7
    Attached Files Attached Files

  10. #10
    Guest
    Join Date
    12-15-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    7

    Re: Help required identifying the first time data is mentioned in 2 columns

    Thank you so much cbatrody!

    I don't understand the coding but it works! I'll have to go through those notes on arrays to figure it out for next time. Thanks again - you are such a big help!

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help required identifying the first time data is mentioned in 2 columns

    This seems to work. Committed with Enter.


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 12-16-2015 at 01:33 PM.

  12. #12
    Registered User
    Join Date
    04-29-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    10

    Re: Help required identifying the first time data is mentioned in 2 columns

    Possible alternative, array formula confirmed with ctrl+shift+enter

    =SUBSTITUTE(INDEX(I1:I24&J1:J24,MIN(IF(IFERROR(FIND("Buying",(I1:I24&J1:J24)),0)+IFERROR(FIND("Selling",(I1:I24&J1:J24)),0)>0,ROW(A1:A24),100))),"Miss","")

+ 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. Replies: 1
    Last Post: 06-05-2015, 06:57 AM
  2. [SOLVED] Data to be mentioned in Column Wise
    By shyampanda in forum Excel General
    Replies: 2
    Last Post: 04-21-2015, 07:07 AM
  3. Identifying and summing sections of columns with identical data?!?
    By Tilly13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-16-2013, 03:18 PM
  4. [SOLVED] Identifying duplicate data using multiple columns
    By DuckMan72 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-13-2013, 05:28 PM
  5. Required the output which is mentioned in the attached file
    By sarode_sumesh in forum Excel General
    Replies: 1
    Last Post: 05-30-2012, 04:59 AM
  6. Identifying an item with data in two columns
    By BaileyWinston in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-23-2010, 11:52 AM
  7. Finding a Min and Max date for any time a name is mentioned
    By mross34 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2008, 11:11 AM

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