Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2008
    Location
    Winchester, Hampshire, United Kingdom
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm trying to extract from a column of values only those that are labelled as "S" in another column. I've tried offset, vlookup and conditional filtering but cannot get these to work. I don't want to create another column with row-by-row extraction because rows will be inserted and the row formulae may not be copied across to the additional column, so the total will lose integrity. Is there a way of doing this based on the existing rows where one cell is text and the other is a value?

    I have attached a sample sheet showing what I am trying to do. This is probably really simple, but I can't get it to work!

    thanks[attachment=82374:Sample.xlsx]
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    SUMIF is the function you need:

    =SUMIF(B2:B7,"S",C2:C7)

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    [quote name='happydaze' post='761487' date='25-Feb-09 16:43']I'm trying to extract from a column of values only those that are labelled as "S" in another column. I've tried offset, vlookup and conditional filtering but cannot get these to work. I don't want to create another column with row-by-row extraction because rows will be inserted and the row formulae may not be copied across to the additional column, so the total will lose integrity. Is there a way of doing this based on the existing rows where one cell is text and the other is a value?

    I have attached a sample sheet showing what I am trying to do. This is probably really simple, but I can't get it to work!

    thanks[attachment=82374:Sample.xlsx][/quote]

    You can use SUMIF:
    =SUMIF($B$2:$B$7,"S",$C$2:$C$7)
    for example.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    New Lounger
    Join Date
    Nov 2008
    Location
    Winchester, Hampshire, United Kingdom
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='761491' date='25-Feb-09 16:48']SUMIF is the function you need:

    =SUMIF(B2:B7,"S",C2:C7)[/quote]

    Thanks to you both, it's cured my headache!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •