1. 选择特定单元格 Range('A1').Select
MsgBox Range('A1').Value
Range('A1').Value = 100
Range('A1:B2').Merge
Range('A1').UnMerge
Range('A1').Interior.Color = RGB(255, 0, 0)
Range('A1').Font.Color = RGB(0, 0, 255)
Range('A1').Font.Size = 12
Range('A1').Font.Bold = True
Range('A1').Font.Italic = True
Range('A1').Font.Underline = True
Range('A1').Borders.LineStyle = xlContinuous
Range('A1').HorizontalAlignment = xlCenter
Range('A1').VerticalAlignment = xlTop
Rows(1).Insert
Rows(1).Delete
Rows(1).Hidden = True
Rows(1).Hidden = False
Range('A1').Copy Destination:=Range('B1')
Range('A1').ClearContents
Range('A1').CurrentRegion.AutoFilter Field:=1, Criteria1:='>100'
Range('A1').CurrentRegion.Sort Key1:=Range('B1'), Order1:=xlAscending
Set foundCell = Range('A1:A10').Find(What:=25, LookIn:=xlValues)
Range('A1:A10').FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, Formula1:='100'
With Range('A1').Validation
ActiveSheet.PageSetup.PrintArea = Range('A1:D10').Address
Range('A1').Offset(1, 0).Resize(RowSize:=2).Insert Shift:=xlDown
Range('A2:A3').Delete Shift:=xlUp
Range('A1').RowHeight = 50
Range('A1').ColumnWidth = 15
Range('A1').Copy Destination:=Range('B1')
Range('B1').PasteSpecial Paste:=xlPasteFormats
Range('A1').Hyperlinks.Add Anchor:=Range('A1'), Address:='http://www.', TextToDisplay:='点击访问'
Range('A1:B10').Value = Range('A1:B10').Value
ActiveSheet.Protect Password:='password'
For Each shp In ActiveSheet.Shapes ... Next shp
Range('A1:B10').Replace What:='old_text', Replacement:='new_text', LookAt:=xlPart, SearchOrder:=xlByRows
Range('A1:A10').NumberFormat = '0.00%'
Range('A1:A10').Font.Name = 'Arial'
Range('A1:A10').FormatConditions.Add Type:=xlExpression, Formula1:='=MOD(A1,2)=0' 跟我学,10天学会(只教vba小白和略懂一点vba但知识点太零散不成系统的朋友)。 扫描二维码加我微信,学费活动价。 |
|