Add Sum of 2 Range Names

  • Thread starter Thread starter John
  • Start date Start date
J

John

I am trying to ADD the Range Name "FoodING_Costs_inQuery TO
Food_Costs_inQuery, in the formula below, where do I position it, I just
can't get it correct, it seems so simple

=IF(COUNTIF(Restaurant_Names_inQuery,"="&$A7)<1,"-",SUMIF(Restaurant_Names_i
nQuery,"="&$A7,Food_Costs_inQuery)/SUMIF(Restaurant_Names_inQuery,"="&$A7,Sa
les_Revenue_inQuery))


Thanks
 
John,

first of all, I don't think you need to use
the ,"="&$a7, in the conditions of the countif and the
sumif, ,$a7, will suffice.

second, in order to use sumif you need to make sure that
the ranges
Restaurant_Names_inQuery
Food_Costs_inQuery
FoodING_Costs_inQuery &
Sales_Revenue_inQuery... all have the same size...

Third... Try this, see if it works, I don't have data to
test it so it's *untested*

=IF(COUNTIF(RESTAURANT_NAMES_inQUERY,$A7)<1,"-",(SUMIF
(RESTAURANT_NAMES_inQUERY,$A7,FOOD_COSTS_INQUERY)+SUMIF
(RESTAURANT_NAMES_inQUERY,$A7,FOOD_COSTS_INQUERY))/SUMIF
(RESTAURANT_NAMES_inQUERY,$A7,SALES_REVENUE_INQUERY))

Cheers
Juan
 
Thanks Juan, can't test it for a few days


Juan Sanchez said:
John,

first of all, I don't think you need to use
the ,"="&$a7, in the conditions of the countif and the
sumif, ,$a7, will suffice.

second, in order to use sumif you need to make sure that
the ranges
Restaurant_Names_inQuery
Food_Costs_inQuery
FoodING_Costs_inQuery &
Sales_Revenue_inQuery... all have the same size...

Third... Try this, see if it works, I don't have data to
test it so it's *untested*

=IF(COUNTIF(RESTAURANT_NAMES_inQUERY,$A7)<1,"-",(SUMIF
(RESTAURANT_NAMES_inQUERY,$A7,FOOD_COSTS_INQUERY)+SUMIF
(RESTAURANT_NAMES_inQUERY,$A7,FOOD_COSTS_INQUERY))/SUMIF
(RESTAURANT_NAMES_inQUERY,$A7,SALES_REVENUE_INQUERY))

Cheers
Juan
 
Back
Top