2014.12.3笔记
来源: | 作者:lzgang | 发布时间: 2014-12-04 | 1012 次浏览 | 分享到:

如果单元格的数值符合某个条件,则显示为另一个单元格的内容,如成绩不合格,显示成绩的拥有人。

=IF(D3<60,B3,"")

 

如果显示成绩拥有人要叠加,中间加顿号

=IF(C3<60,B3&"","")

 

最后汇总名单(叠加单元格内容,如果双引号如果空一各,叠加后也会空一小格。有了前面的顿号,这里的双引号就不用空了)

=AG2&""&AG3&""&AG4&""&AG5&""&AG6&""&AG7&""&AG8&""&AG9&""&AG10&""&AG11&""&AG12&""&AG13&""&AG14&""&AG15&""&AG16&""&AG17&""&AG18&""&AG19&""&AG20&""&AG21&""&AG22&""&AG23&""&AG24&""&AG25&""&AG26&""&AG27&""&AG28&""&AG29&""&AG30&""&AG31&""&AG32&""&AG33&""&AG34&""&AG35&""&AG36&""&AG37&""&AG38&""&AG39&""&AG40&""&AG41&""&AG42&""&AG43&""&AG44

 

 

 

 

在单元格内增加文字或其它单元格的内容

 

=C4&"同学,你在本学期的加分奖励有:"&D4

 

 

如何将excel单元格中一部分数据提取到另一单元格

例如A1内容:0.75*1.219*2.438 我想提取此单元格中的前四位字符"0.75"到另一单元格C1?

C1中输入 =left(A1,4) 这是以4个为标准。

例如A1内容: 中山市东凤镇,我想提取此单元格中的前四位字符"中山市"到另一单元格C1?

C1中输入 =left(A1,3) 这是以4个为标准。

 

 

excel单元格怎么显示字符加其他单元格的数字

="要显示的字符" & a2

 a2为其它单元格

Excel中如何在一个单元格中的输入身份证号时在另一个单元格中显示为该出生日期

A2 是身份证号 B2 输入:=mid(A2,7,8)

excel中在一个单元格输入数字在另一个单元格中显示这个数字的大写和小写

A1的单元格中输入“101”,在A2中则显示壹佰零壹元整(101.00)”

A2输入

=IF(A1=0,"",IF(INT(A1),TEXT(TRUNC(A1),"[dbnum2]")&"","")&IF(MOD(A1,1)=0,"",IF(TRUNC(A1,1),IF(A1=TRUNC(A1,1),TEXT(LEFT(RIGHT(A1*100,2)),"[dbnum2]0角整"),TEXT(RIGHT(A1*100,2),"[dbnum2]0"&IF(LEFT(RIGHT(A1*100,2))="0","","")&"0")),TEXT(A1*100,"[dbnum2]0"))))&"("&TEXT(a1,"#,##0.00;-#,##0.00")&")"

Excel中在一个单元格中输入商品的编号在另一个单元格显示该商品的名称

=VLOOKUPA1SHEET1AB2,),下拉。

EXCEL中当一个单元格输入某文字或数字时,另一个单元格会自动输入对应的文字或数字

B1=INDEX({输出1,输出2,输出3},MATCH(A1,{条件1,条件2,条件3},0)) A1=1B1=a A1=2B1=b A1=3B1=c: B1=INDEX({"a","b","c"},MATCH(A1,{1,2,3},0)) 增加一个条件: B1=INDEX({"a","b","c","d"},MATCH(A1,{1,2,3,4},0))

不太好用:不如自动更正

能不能设置在EXCEL单元格中输入一个字符,但显示其他的字符

在工作表右键代码中输入(只限B

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Row >= 1 And Target.Row <= 1000 And Target.Column = 2 Then

If Target.Cells = "cd" Then

Application.EnableEvents = False

Target.Cells = "迟到**"

Application.EnableEvents = True

End If

If Target.Cells = "kk" Then

Application.EnableEvents = False

Target.Cells = "旷课**"

Application.EnableEvents = True

End If

End If

End Sub

例如:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Row >= 1 And Target.Row <= 100 And Target.Column = 2 Then

If Target.Cells = "cd" Then

Application.EnableEvents = False

Target.Cells = "迟到**"

Application.EnableEvents = True

End If

If Target.Cells = "kk" Then

Application.EnableEvents = False

Target.Cells = "旷课**"

Application.EnableEvents = True

End If

If Target.Cells = "xk" Then

Application.EnableEvents = False

Target.Cells = "校卡*"

Application.EnableEvents = True

End If

If Target.Cells = "yb" Then

Application.EnableEvents = False

Target.Cells = "仪表**"

Application.EnableEvents = True

End If

If Target.Cells = "bj" Then

Application.EnableEvents = False

Target.Cells = "病假"

Application.EnableEvents = True

End If

If Target.Cells = "sj" Then

Application.EnableEvents = False

Target.Cells = "事假**"

Application.EnableEvents = True

End If

If Target.Cells = "cc" Then

Application.EnableEvents = False

Target.Cells = "出操**"

Application.EnableEvents = True

End If

If Target.Cells = "sw" Then

Application.EnableEvents = False

Target.Cells = "食物**"

Application.EnableEvents = True

End If

If Target.Cells = "zr" Then

Application.EnableEvents = False

Target.Cells = "值日**"

Application.EnableEvents = True

End If

If Target.Cells = "kt" Then

Application.EnableEvents = False

Target.Cells = "课堂**"

Application.EnableEvents = True

End If

If Target.Cells = "zt" Then

Application.EnableEvents = False

Target.Cells = "早退**"

Application.EnableEvents = True

End If

End If

End Sub