+ Reply to Thread
Results 1 to 6 of 6

Need values of multiple cells based on multiple other cells

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Hayes, VA
    MS-Off Ver
    Excel 2010
    Posts
    31

    Need values of multiple cells based on multiple other cells

    Sorry about the title. I don't know how else to explain it.

    I've attached a spreadsheet showing what I need to do.

    Unfortunatly, I don't have the luxury of using a macro because they are blocked by our network, so I'm hoping someone can figure out a way to do this without me having to reformat the entire sheet. Its pretty extensive.

    Example.xlsx

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Need values of multiple cells based on multiple other cells

    =SUMPRODUCT(--(ISNUMBER(SEARCH(" "&"cell"&" "," "&$A$2:$A$8&" "))),$C$2:$C$8)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Hayes, VA
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Need values of multiple cells based on multiple other cells

    Hi martindwilson,

    Thanks for the reply, but I guess I didn't explain right.

    Where my problem comes in, if you look at the attached spreadsheet, I need to sum the values of cells C1 and C5 based on the fact that the word "Cell" is in A2 and A6. The value is one row up from the found search term, not on the same row.

    My apologies for not providing a better explanation.

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Need values of multiple cells based on multiple other cells

    this is a very rudimentary approach, i hope someone helps you with a better solution:
    Attached Files Attached Files
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Need values of multiple cells based on multiple other cells

    offset the formula note there must be the same number of cells in both ranges a2:a8=7 c1:c7=7
    =SUMPRODUCT(--(ISNUMBER(SEARCH(" "&"cell"&" "," "&$A$2:$A$8&" "))),$C$1:$C$7)
    gives 24690

  6. #6
    Registered User
    Join Date
    08-09-2012
    Location
    Hayes, VA
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Need values of multiple cells based on multiple other cells

    icestationzbra: Good thinking. It may be rudimentary, but it works Thanks for giving me the idea though. I didn't think about using a true or false in another cell.

    martindwilson: Your solution is a little cleaner and avoids me having to use another column. I wasn't aware I could offset the ranges. DUH.

    Really do appreciate the assistance guys!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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