+ Reply to Thread
Results 1 to 5 of 5

Match single criteria and return multiple rows in excel

  1. #1
    Registered User
    Join Date
    02-07-2014
    Location
    South Dakota
    MS-Off Ver
    Excel 2003
    Posts
    3

    Match single criteria and return multiple rows in excel

    Hello all,

    I figure myself to be fairly knowledgeable with excel but I am stuck. I am using excel to import invoices into Quick books but each item must be separate lines. Here is my problem. Here is an example of what my data will look like:

    A B C D
    Item Total Quantity Total Price Answer
    1 ABN 1030 & ABN 1031 5 22.84 ABN 1030
    2 ABN 1031


    I need a formula that will read column A1 and return values in separate cells like in D1 and D2. The way I'm thinking is the formula would be have to be in D1 and return values in both D1 and D2. As in some kind of If formula, if a1=whatever, then d1 AND d2 = some value

    Please let me know if this is possible as it would save us thousands of dollars in labor costs

  2. #2
    Registered User
    Join Date
    01-25-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Match single criteria and return multiple rows in excel

    Your layout is slightly confusing. Consider uploading a sample Excel file, that would make it much easier to understand.

    You'd like column D to contain your formula? Ideally, in your above example, what should the result in column D look like?
    http://answernothing.com

  3. #3
    Registered User
    Join Date
    02-07-2014
    Location
    South Dakota
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Match single criteria and return multiple rows in excel

    Attached is an example. I want the cells in column D to be based off the cells in column A. If A if a combination of two items, I need the items to be show in column D but on separate lines. Is there a way to return data on multiple lines with the formula in only one?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-25-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Match single criteria and return multiple rows in excel

    So if I understand this right, you'd like

    A2="ABN 1030 & ABN 1031"
    to become
    D2="ABN 1030" and D3="ABN 1031"

    My question is, Do you have to use formulas for this? Without seeing all your data, it looks like when you have multiple items in 1 cell, they are separated with " & "

    One thing you could do is highlight your A column, press "control + F", choose "Replace" and replace " & " with "|". Make sure to include the spaces on either side of the &. Then on the Data tab, choose "Text to Columns." Click "Delimited", check "Other" and type "|" in the box. When you click Finish, any occurrence of "|", will be removed and split the text into separate cells. It's then much easier to copy and paste the columns into a single column.

    (If you try this, make sure to copy your A column into a blank tab, because neighboring cells may be overwritten.)

    Would this approach help?
    Last edited by AnswerNothing; 02-07-2014 at 05:12 PM.

  5. #5
    Registered User
    Join Date
    02-07-2014
    Location
    South Dakota
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Match single criteria and return multiple rows in excel

    In this instance it wouldn't. A4 would be an example because the "item name" is actually a combination of 4 items that cannot be split using the text to columns.

+ 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. Search for Multiple Criteria and Return all Rows that Match.
    By Kimston in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2013, 11:46 AM
  2. [SOLVED] How to return multiple values that match a single search criteria?
    By JSallen in forum Excel General
    Replies: 4
    Last Post: 11-28-2012, 11:49 AM
  3. Single criteria return multiple rows
    By shanel in forum Excel General
    Replies: 2
    Last Post: 02-17-2012, 12:06 PM
  4. Match Single Numeric Criteria and Return Multiple Numeric Labels
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2005, 04:10 PM
  5. [SOLVED] Match Single Numeric Criteria and Return Multiple Numeric Labels
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-29-2005, 04:50 PM

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