Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default someone please shorten this formula...

It's hard to describe what I am doing, but here's my formula...

=IF(COUNTIF(DARIN!D3,"=A"),SUM(DARIN!C3),0)+IF(COU NTIF(JASMINE!D3,"=A"),SUM(JASMINE!C3),0)
+IF(COUNTIF(DARIN!D4,"=A"),SUM(DARIN!C4),0)+IF(COU NTIF(JASMINE!D4,"=A"),SUM(JASMINE!C4),0)
+IF(COUNTIF(DARIN!D5,"=A"),SUM(DARIN!C5),0)+IF(COU NTIF(JASMINE!D5,"=A"),SUM(JASMINE!C5),0)
+IF(COUNTIF(DARIN!D6,"=A"),SUM(DARIN!C6),0)+IF(COU NTIF(JASMINE!D6,"=A"),SUM(JASMINE!C6),0)


See how it's an array... there must be a way to shorten it, but I think I am
using the wrong functions. I've spent several hours tinkering around but
cannot get it to work. The problem is that if you do COUNTIF(D3:D6,"=A"), if
one item is A, then the whole function is true, causing it to add
incorrectly. Someone HELP! :)

Basically if D3 equals "A", then add C3, if D4 equals "A", then add C4 + C3,
etc. Not to mention I am pulling the info from 2 different tabs.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default someone please shorten this formula...

How about:
=sumif(darin!d3:d6,"A",darin!c3:c6)+sumif(jasmine! d3:d6,"A",jasmine!c3:c6)

Regards,
Fred
"wildwheelz" wrote in message
...
It's hard to describe what I am doing, but here's my formula...

=IF(COUNTIF(DARIN!D3,"=A"),SUM(DARIN!C3),0)+IF(COU NTIF(JASMINE!D3,"=A"),SUM(JASMINE!C3),0)
+IF(COUNTIF(DARIN!D4,"=A"),SUM(DARIN!C4),0)+IF(COU NTIF(JASMINE!D4,"=A"),SUM(JASMINE!C4),0)
+IF(COUNTIF(DARIN!D5,"=A"),SUM(DARIN!C5),0)+IF(COU NTIF(JASMINE!D5,"=A"),SUM(JASMINE!C5),0)
+IF(COUNTIF(DARIN!D6,"=A"),SUM(DARIN!C6),0)+IF(COU NTIF(JASMINE!D6,"=A"),SUM(JASMINE!C6),0)


See how it's an array... there must be a way to shorten it, but I think I
am
using the wrong functions. I've spent several hours tinkering around but
cannot get it to work. The problem is that if you do COUNTIF(D3:D6,"=A"),
if
one item is A, then the whole function is true, causing it to add
incorrectly. Someone HELP! :)

Basically if D3 equals "A", then add C3, if D4 equals "A", then add C4 +
C3,
etc. Not to mention I am pulling the info from 2 different tabs.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default someone please shorten this formula...

This will do what your current formula is doing. Whether that's what you
really want is another story!

=SUMIF(DARIN!D3:D6,"A",DARIN!C3:C6)+SUMIF(JASMINE! D3:D6,"A",JASMINE!C3:C6)

--
Biff
Microsoft Excel MVP


"wildwheelz" wrote in message
...
It's hard to describe what I am doing, but here's my formula...

=IF(COUNTIF(DARIN!D3,"=A"),SUM(DARIN!C3),0)+IF(COU NTIF(JASMINE!D3,"=A"),SUM(JASMINE!C3),0)
+IF(COUNTIF(DARIN!D4,"=A"),SUM(DARIN!C4),0)+IF(COU NTIF(JASMINE!D4,"=A"),SUM(JASMINE!C4),0)
+IF(COUNTIF(DARIN!D5,"=A"),SUM(DARIN!C5),0)+IF(COU NTIF(JASMINE!D5,"=A"),SUM(JASMINE!C5),0)
+IF(COUNTIF(DARIN!D6,"=A"),SUM(DARIN!C6),0)+IF(COU NTIF(JASMINE!D6,"=A"),SUM(JASMINE!C6),0)


See how it's an array... there must be a way to shorten it, but I think I
am
using the wrong functions. I've spent several hours tinkering around but
cannot get it to work. The problem is that if you do COUNTIF(D3:D6,"=A"),
if
one item is A, then the whole function is true, causing it to add
incorrectly. Someone HELP! :)

Basically if D3 equals "A", then add C3, if D4 equals "A", then add C4 +
C3,
etc. Not to mention I am pulling the info from 2 different tabs.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default someone please shorten this formula...

THANKS! I tried using that function but didn't quite get it.... you guys
rock! They probably call you experts :)
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default someone please shorten this formula...

Works exactly how I want it to... thanks! I am making a guest list for an
upcoming wedding and I have an A,B,C priority list + number of guests (a
couple would be 2 people). On my summary page, I wanted to list how many A's,
B's, C's are listed... so thanks!!


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default someone please shorten this formula...

Glad to help. Thanks for the feedback.

Regards,
Fred

"wildwheelz" wrote in message
...
THANKS! I tried using that function but didn't quite get it.... you guys
rock! They probably call you experts :)


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default someone please shorten this formula...

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"wildwheelz" wrote in message
...
Works exactly how I want it to... thanks! I am making a guest list for an
upcoming wedding and I have an A,B,C priority list + number of guests (a
couple would be 2 people). On my summary page, I wanted to list how many
A's,
B's, C's are listed... so thanks!!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I shorten an IF formula? FJM Excel Worksheet Functions 7 May 28th 10 06:01 PM
Shorten a formula Jeze77 Excel Discussion (Misc queries) 0 August 30th 07 07:46 PM
Shorten a formula Jeze77 Excel Discussion (Misc queries) 6 August 30th 07 06:34 PM
Shorten an IF formula Joker Excel Discussion (Misc queries) 4 December 10th 05 12:30 PM
Trying to shorten (or use new) formula Monk Excel Discussion (Misc queries) 1 June 29th 05 06:23 PM


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

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

About Us

"It's about Microsoft Excel"