Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL Array formula help

Status
Not open for further replies.

fargo

Programmer
Nov 9, 2000
63
GB
Hi
I am trying to use this array formula but I get the '#num' error.
My formula is
=sumif(if(('Do not touch'1A:A=Gosport!A4)*('Do not touch'!C:C=1),'Donottouch'!D:D))

'Do not touch'=a value on a second sheet from 1-500

Gosport!A4=value on same sheet as formula

'Do not touch'!C:C=1=value on second sheet-either 01,02 or 03

'Donottouch'!D:D=value on second sheet that I want to total

I want to total the values in the second sheet column D, but only if the values on the second sheet column A equal the value in the first sheet cell A$
AND the value in the second sheet column C equals "01".
I then enter this as an Array formula but I just get the error #num.
Any ideas
thanks
Stu
 
grrrrrr..!
:)

in the sumif function you can specify only one condition. If you want to use this function, on the second sheet create a new column, and in this column concatenate the values in the column A & C like:
z4 formula: =A4 & C4
after Your formula (from the row 1 to 5000):
=sumif('Do not touch'!Z1:Z5000,A4,'Donottouch'!D1:D5000)

ide
 
in your case the best way, i think, using DSUM function.
If Your database on sheet 'Do not touch' is A1:D60000,
and in the first row in the database not empty and containing the names of columns (names: D1, D2, D3, D4)
and on the first sheet is a range A1:B2 with the criteria;
A1: D1
B1: D3
A2: i dont know; value what is now in the cell "A4" at you
B2: "01"

and the formula:
=DSUM('Do not touch'!A1:D60000, 'Do not touch'!D1, A1:B2)

from Excel help:
Syntax
DSUM(database,field,criteria)

Database is the range of cells that make up the list or database. A database is a list of related data in which rows of related information are records and columns of data are fields. The first row of the list contains labels for each column.

Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.

Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label for specifying a condition for the column.


i hope it helps you
ide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top