+ Reply to Thread
Results 1 to 11 of 11

Formula to search specific cells for number then add data from other rows

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Formula to search specific cells for number then add data from other rows

    I HAVE A RANGE FROM (C19-K27) DEPENDING ON THE SERIAL NUMBERS IN THAT RANGE I KEEP TRACK OF DATA FROM ROWS 14 & 16. WHAT I WOULD LIKE IS FOR EXAMPLE IN THE BOX IN COLUMN "O" DEPENDING WHAT I HAVE SELECTED I WANT THE FORMULA TO SEARCH THE RANGE (C19-K27) AND IF IT FINDS THAT EXACT SERIAL NUMBER TO ADD THE DATA IN ROW 16 AND HAVE THAT IN (P9) THEN USE THE DATA IN ROW 14 THAT ANSWER GOES INTO (Q9) WHICH CORRESPONDS FOR THAT SERIAL NUMBER.

    i HAVE ATTACHED A SAMPLE SHEET

    THANKS FOR YOUR HELP
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to search specific cells for number then add data from other rows

    I think your caps lock is stuck!

    Try this one in P9

    =SUMPRODUCT(($C$19:$K$28=T(O9))*$C$16:$K$16)

  3. #3
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Re: Formula to search specific cells for number then add data from other rows

    Yes that worked in P9 but I changed it for Q9 to this

    =SUMPRODUCT(($C$19:$K$28=T(O9))*$C$16:$K$16)

    all I get is #Value

    Sorry about caps lock that's all we use over here i forget to turn it off sometimes.

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to search specific cells for number then add data from other rows

    For Q9, it should be

    =SUMPRODUCT(($C$19:$K$28=T(O9))*$C$14:$K$14)

    Not sure what you tried, the formula in your reply was the same as the original one?

  5. #5
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Re: Formula to search specific cells for number then add data from other rows

    You are correct my mistake i used
    =SUMPRODUCT(($C$19:$K$28=T(O9))*$C$14:$K$14)

    the same is you but I get #Value as an answer

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to search specific cells for number then add data from other rows

    I just noticed that you have formula blanks in F14 and H14:K14 which are causing the error.

    Try this insted, which will need to be array confirmed with Shift Ctrl Enter.

    =SUMPRODUCT(($C$19:$K$28=T(O9))*IF(ISNUMBER($C$14:$K$14),$C$14:$K$14))

  7. #7
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Re: Formula to search specific cells for number then add data from other rows

    sorry to be a pain butt hat returned 0.00

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to search specific cells for number then add data from other rows

    No curly brackets in the formula bar?

    If you got 0.00 then the array is not confirmed.

    Double click in the cell, then press Shift Ctrl and Enter simultaneously.

  9. #9
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Re: Formula to search specific cells for number then add data from other rows

    That worked thank you

  10. #10
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Re: Formula to search specific cells for number then add data from other rows

    I noticed that as you carry the formula down and if range O(9-15) is blank it adds numbers that should not be added

  11. #11
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to search specific cells for number then add data from other rows

    I noticed that earlier, could have sworn that using the T() function had fixed that.

    =IF(O9="","",SUMPRODUCT(($C$19:$K$28=O9)*IF(ISNUMBER($C$14:$K$14),$C$14:$K$14)))

    Array confirmed in Q9

    Given the odd problems appearing here and there, it might be benificial to use this formula, with the rows changed in P9 as well.

+ 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] Macro to insert specific number of rows, populate rows with data above except date
    By Melissa Camp in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-08-2015, 03:59 PM
  2. Replies: 1
    Last Post: 08-25-2015, 05:08 PM
  3. [SOLVED] search for specific data in two columns and if it matches returns an ID number
    By ncaravela in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2013, 01:48 PM
  4. Search for specific data and count number of rows till empty Cell
    By kjanani30 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2013, 06:05 AM
  5. [SOLVED] Complex Data Search - finding consecutive rows with a specific pattern
    By multiades in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-15-2012, 07:47 PM
  6. Formula to search cells/columns containing specific text
    By serenalove in forum Excel General
    Replies: 2
    Last Post: 01-25-2010, 01:03 PM
  7. [SOLVED] Search for a number in a table and return data of a specific cell
    By Karaman in forum Excel General
    Replies: 4
    Last Post: 06-30-2006, 10:50 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