【Indirect函数】

INDIRECT函数
 

How to use the INDIRECT function to create references in Excel
 

利用indirect和data validation来做级联菜单

Excel Data Validation -- Create Dependent Lists

Create Cascading Drop Down Menu Box List Using Data Validation in Excel

indirect用法

Excel INDIRECT Function(http://www.contextures.com)非常详细
 

Excel INDIRECT Function Arguments 
Lock a Cell Reference 
Create a Reference from a Cell Value 
Create a Reference from a Cell Value and Text 
Create a Reference to a Different Sheet 
Create a Reference to a Different Workbook 
Refer to a Named Range  
Dependent Data Validation Lists 
 

【sumif&sumifs】

sumif符合两个条件需要用数组公式即CSE

小杨用实例讲解条件求和函数 SumIF 的详细用法

Use a Special Excel Array Formula to Simulate SUMIF with Two Conditions


Excel Functions: Excel 2003 SUMIF() & Excel 2007 SUMIFS()

[多重合并数据透视表] 

 数据透视表之多表合并.xls

Excel数据透视表多表合并应用教程(下载)
 

Create Excel Pivot Table from Multiple Sheets
 

用VBA进行多表合并计算一例

[按颜色排序]

在Excel2007中按单元格颜色进行排序

Excel技巧之按颜色排序或筛选
 

易宝典:Excel 2007 能不能按颜色对数据进行排序?
 

如何为EXCEL单元格颜色排序
 

在excel中依据颜色进行排序

http://www.excelperfect.com/ 完美Excel

http://wwww.excel123.com 

 

http://www.excelhome.net 

 

http://www.excelqq.com 

http://www.exceltip.net

http://www.excelpx.com 

http://www.excelforum.com

http://www.excelboost.com

http://www.mrexcel.com/

 

按指定的单元格颜色进行计数或求和
 
作者:未知 文章来源:未知 点击数: 3659 更新时间:2009-6-19 16:45:17
 

    如果Excel工作表的某区域中包含不同的底纹颜色,我们可以用一个自定义函数对该区域按指定的单元格颜色进行计数或求和。方法是:

    1.按Alt+F11,打开VBA编辑器。

    2.单击菜单“插入→模块”,将插入名称为“模块1”的模块,在右侧的代码窗口中输入下列代码:

Function SumByColor(Ref_color As Range, Sum_range As Range)
Application.Volatile
Dim iCol As Integer
Dim rCell As Range
iCol = Ref_color.Interior.ColorIndex
For Each rCell In Sum_range
If iCol = rCell.Interior.ColorIndex Then
SumByColor = SumByColor + rCell.Value
End If
Next rCell
End Function


Function CountByColor(Ref_color As Range, CountRange As Range)
Application.Volatile
Dim iCol As Integer
Dim rCell As Range
iCol = Ref_color.Interior.ColorIndex
For Each rCell In CountRange
If iCol = rCell.Interior.ColorIndex Then
CountByColor = CountByColor + 1
End If
Next rCell
End Function

    上述两个自定义函数,一个是SumByColor,可以对区域按指定单元格的颜色求和。另一个是CountByColor,可以统计区域中某种颜色的个数。这两个自定义函数都有两个参数,前一个参数指定包含某种颜色的单元格,后一个参数为求和或计数区域。

    3.关闭VBA编辑器。

    使用方法:假如要求和或计数的区域在A1:B10区域中。

   

    求出该区域中单元格底纹颜色为红色的所有单元格数值之和,在单元格中输入公式:

    =sumByColor(A1,A1:B10)

    求出该区域中单元格底纹颜色为红色的所有单元格的个数,在单元格中输入公式:

    =CountByColor(A1,A1:B10)

 


Past Tip of the Day


Kári asks, I have a formula where I have to put in a criteria. The criteria is, that the formula has to gather numbers that are bigger than 0,5 (>0,5), but not bigger than 2 (<2). But how do I do that? I have tried: ">0,5"&"<2" and a lot of other combinations, but nothing works.

Kári: For a SUMIF or COUNTIF formula with 2 conditions, you need to use an array formula.
This type of formula is discussed here: http://www.mrexcel.com/tip031.shtml.

Since I wrote that article a few years ago, a better version of the formula has come to light. The web page discusses using this formula for a CountIf with 2 conditions:
=SUM(IF($C$2:$C$4403>0.5,IF($B$2:$B$4403<2,1,0),0))

You can use boolean logic instead to write this formula for CountIf
=SUM(($C$2:$C$4403>0.5)*($C$2:$C$4403<2)*1)
or this formula for SumIf:
=SUM(($C$2:$C$4403>0.5)*($C$2:$C$4403<2)*($C$2:$C$4403))

Remember, you must hold down the Ctrl and Shift keys then hit enter to enter these CSE or Array formulas.

 

This tip, and 276 others are in the best-selling book, Learn Excel from MrExcel. You can sign up to receive chapters from this book every Tuesday for free.