# Thread: Conditional Total - Excel 2007

1. 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]

2. SUMIF is the function you need:

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

3. [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.

4. [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
•