Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Using Multiple Variables in an Array with Booleans

Hello,

I am having a bit of a problem using Arrays and Booleans that I was
hoping someone could shed some light on. I have a table with mulitple
and repeating descriptors that other formulas that gives me a specific
number in certain months. For example. In row 1 will have a code
number of "2000" which is a code for a certain product. In the next
column on the same row I have another descriptor that I type in such as
"blue" "green", etc...There are other columns with formulas that give
me a specific number on a per month basis. (each month is in its own
column)

I need to sum all the numbers for a specific month that match both
decriptors (code: 2000 and the color green). I have tried Arrays with
Booleans, but always get the number zero.

Any suggestions would be tremendously welcomed! Thanks for your time.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Using Multiple Variables in an Array with Booleans

=SUMPRODUCT((A1:A20=2000)*(B1:B20="green")*(OFFSET (C1,0,month-1,20)))

The 20 in the OFFSET refers to the 20 rows, adjust with the ranges.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"cardan" wrote in message
s.com...
Hello,

I am having a bit of a problem using Arrays and Booleans that I was
hoping someone could shed some light on. I have a table with mulitple
and repeating descriptors that other formulas that gives me a specific
number in certain months. For example. In row 1 will have a code
number of "2000" which is a code for a certain product. In the next
column on the same row I have another descriptor that I type in such as
"blue" "green", etc...There are other columns with formulas that give
me a specific number on a per month basis. (each month is in its own
column)

I need to sum all the numbers for a specific month that match both
decriptors (code: 2000 and the color green). I have tried Arrays with
Booleans, but always get the number zero.

Any suggestions would be tremendously welcomed! Thanks for your time.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Using Multiple Variables in an Array with Booleans

Alok, Thank you for the response. The formual you presented is very
similar to what I am trying to do. I tried it with SUM and your way
with SUMPRODUCT but I either get 0 or I still get the VALUE error, even
when I convert it to an array. I don't think I need to use OFFSETS as
Bob suggested. As for the "2000" and "Green" I am referencing cells to
link these (I am essentially creating a new table and manually
inputting the variables I want in to automatically put in the month
column.) I tried hard coding but also to no avail. Thanks again for
your response. Dan


Alok wrote:
It is better to use a formula in this case

=sumproduct(--(A1:A1000=2000)*--(C1:C1000="green")*(D1:D1000))
This assumes that numbers like 2000 are in column A, green, red and so on
are in column C and the month numbers are in column D.

Alok
"cardan" wrote:

Hello,

I am having a bit of a problem using Arrays and Booleans that I was
hoping someone could shed some light on. I have a table with mulitple
and repeating descriptors that other formulas that gives me a specific
number in certain months. For example. In row 1 will have a code
number of "2000" which is a code for a certain product. In the next
column on the same row I have another descriptor that I type in such as
"blue" "green", etc...There are other columns with formulas that give
me a specific number on a per month basis. (each month is in its own
column)

I need to sum all the numbers for a specific month that match both
decriptors (code: 2000 and the color green). I have tried Arrays with
Booleans, but always get the number zero.

Any suggestions would be tremendously welcomed! Thanks for your time.



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
Declare Variables in Array Mike H. Excel Discussion (Misc queries) 2 March 11th 09 12:33 PM
Using booleans in sumproduct formulas to extract boolean range ExcelMonkey Excel Worksheet Functions 4 April 4th 07 12:06 AM
Variables in Declaring an Array Jimmy Excel Programming 16 October 23rd 06 09:48 PM
Fill array with fn variables that vary across and down? Llurker Excel Worksheet Functions 3 May 29th 05 02:27 AM
How to use array formula for three variables? MelissaS Excel Discussion (Misc queries) 2 January 20th 05 01:16 PM


All times are GMT +1. The time now is 08:55 AM.

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"