A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SUMIF? or not?



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2010, 06:52 PM posted to microsoft.public.excel.worksheet.functions
Scott A
external usenet poster
 
Posts: 67
Default SUMIF? or not?

Hello,

I have 3 columns, the first with a rating of 1-10 in each row, the second is
blank and the trird has a description for the rating. When someone picks a
rating they place a "1" in the second row cell next to the 1-10 rating. I
would like the cell at the bottom of the second row to look at all the cells
and see which one has a 1 in it and then look to the cell to the left and
report that number. What formula doe this?

Example:

A B C
1 .5 Day
2 1 day
3 2-3 Days
4 4-6 Days
5 7-8 Days
6 2-3 Weeks
7 3-4 Weeks
8 1 4-6 Weeks
9 5-8 Weeks
10 More than 8 weeks
8 Total Points


  #2  
Old April 29th, 2010, 07:12 PM posted to microsoft.public.excel.worksheet.functions
JLatham
external usenet poster
 
Posts: 1,896
Default SUMIF? or not?

=SUMIF(B1:B10,1,A1:A10)
will give you the total from column A for all entries where there is a 1 in
column B next to it. If there's only a single 1, then you get that row's
value from A; and if more than a single 1, you get a total of all with 1 in B.

If there's a chance of more than a single 1 being in column B and you want
to get the value from A associated with the first one, you can use either of
these (first allows you to change values in A and pick up proper value,
second one works because your values are simple 1-10 values).
=INDEX(A1:A10,MATCH(1,B1:B10,-1),1)
or as long as values are also 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10:
=MATCH(1,B1:B10,-1)


"Scott A" wrote:

Hello,

I have 3 columns, the first with a rating of 1-10 in each row, the second is
blank and the trird has a description for the rating. When someone picks a
rating they place a "1" in the second row cell next to the 1-10 rating. I
would like the cell at the bottom of the second row to look at all the cells
and see which one has a 1 in it and then look to the cell to the left and
report that number. What formula doe this?

Example:

A B C
1 .5 Day
2 1 day
3 2-3 Days
4 4-6 Days
5 7-8 Days
6 2-3 Weeks
7 3-4 Weeks
8 1 4-6 Weeks
9 5-8 Weeks
10 More than 8 weeks
8 Total Points


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.