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  

Counting formula



 
 
Thread Tools Display Modes
  #1  
Old March 20th, 2010, 02:41 AM posted to microsoft.public.excel.worksheet.functions
lawhawg
external usenet poster
 
Posts: 1
Default Counting formula

I need a formula to sum on the cells that match a variable in another cell

A B C D E F G H I
1
2 Bo Jim Ron
3 3 2 6
4 1 2 3 4 5 6 ? ? ?

What I need to be able to do is sum the number of columns (A4:F4) that
matches the numbers in G3:I3. So, the sum I'm looking for in G4 is 6 (the
sum of A4:C4) or 6. H4 would sum to 3 and I4 would be 21. Can you help me
please?
  #2  
Old March 20th, 2010, 03:15 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Counting formula

Try this...

=SUM($A4:INDEX($A4:$F4,G3))

Copy across.

Note that if G3 is an empty cell the formula will sum the *entire* range.

--
Biff
Microsoft Excel MVP


"lawhawg" wrote in message
...
I need a formula to sum on the cells that match a variable in another cell

A B C D E F G H I
1
2 Bo Jim Ron
3 3 2 6
4 1 2 3 4 5 6 ? ? ?

What I need to be able to do is sum the number of columns (A4:F4) that
matches the numbers in G3:I3. So, the sum I'm looking for in G4 is 6
(the
sum of A4:C4) or 6. H4 would sum to 3 and I4 would be 21. Can you help
me
please?



 




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 01:31 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.