Вы находитесь на странице: 1из 9

Sub Cambia_Sexo() Range("b10").Select Do Until ActiveCell.Value = "Sexo" ActiveCell.Offset(0, 1).Select Loop Do Until ActiveCell.Value = "" If ActiveCell.

Value = "M" Then ActiveCell.Value = " MASCULINO" If ActiveCell.Value = "F" Then ActiveCell.Value = " FEMENINO" ActiveCell.Offset(1, 0).Select Loop End Sub

Sub Porcentaje() Range("b5").Select Do Until ActiveCell.Value = "" Do Until ActiveCell.Value = "" If ActiveCell.Value >= 0.4 Then Selection.Font.Bold = True Selection.Font.Size = 16 Selection.Font.ColorIndex = 2 ElseIf ActiveCell.Value >= 0.3 And ActiveCell.Value < 0.4 Then Selection.Font.Italic = True Selection.Font.Size = 8 Selection.Font.ColorIndex = 5

ElseIf ActiveCell.Value >= 0.2 And ActiveCell.Value < 0.3 Then Selection.Font.Underline = xlUnderlineStyleSingle Selection.Font.Size = 25 Selection.Font.ColorIndex = 30 ElseIf ActiveCell.Value >= 0 And ActiveCell.Value < 0.2 Then Selection.Font.Name = "Garamond" Selection.Font.Size = 14 Selection.Font.ColorIndex = 45 End If ActiveCell.Offset(0, 1).Select Loop ActiveCell.Offset(1, -7).Select Loop End Sub

Sub No_Electrnica() Range("E10").Select Do Until ActiveCell.Value = "" If ActiveCell.Value <> "Electrnica" Then Selection.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Loop End Sub

Sub Cambia_Sexo() Range("b10").Select Do Until ActiveCell.Value = "Sexo" ActiveCell.Offset(0, 1).Select Loop Do Until ActiveCell.Value = "" If ActiveCell.Value = "M" Then ActiveCell.Value = " MASCULINO" Else If ActiveCell.Value = "F" Then ActiveCell.Value = " FEMENINO" ActiveCell.Offset(1, 0).Select End If Loop End Sub

Sub BHIBHKIBHI() ' BHIBHKIBHI Macro Selection.Cut ActiveCell.Offset(0, 2).Range("A1").Select Selection.Insert Shift:=xlToRight End Sub

Sub Filtro_Avanzado() ' Filtro_Avanzado Macro Range("A6").Select Selection.CurrentRegion.Select Range("A6:N56").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _ "Hoja1!Criteria"), CopyToRange:=Range("A60"), Unique:=False End Sub Sub Actualizar() ' Actualizar Macro Rows("60:60").Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Range("A1").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Criterios", RefersToR1C1:= _ Selection.CurrentRegion Range("A6").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Tabla", RefersToR1C1:= _ Selection.CurrentRegion Range("A6").Select Range("Zona_Tabla").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _ Range("Zona_Criterios"), CopyToRange:=Range("A60"), Unique:=False End Sub

Sub Copiar_Nombre_Apellido() Sheets("Hoja 1").Select Range("C2").Select Do Until AcvtiveCell.Value = "" Range("A2").Select If ActiveCell.Value = "x" Then Selection.Font.Bold ActiveCell.Offset(1, 0).Select End If Loop Rows("60:60").Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Range("A1").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Criterios", RefersToR1C1:= _ Selection.CurrentRegion Range("A6").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Tabla", RefersToR1C1:= _ Selection.CurrentRegion Range("A6").Select Range("Zona_Tabla").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _ Range("Zona_Criterios"), CopyToRange:=Range("A60"), Unique:=False End Sub

Estructuras de Control Sub ColorONegrita() If ActiveCell.Value = 25 Then Selection.Font.ColorIndex = 5 Else Selection.Font.Bold = True End If End Sub

Sub Recorre() Range("B5").Select Do Until ActiveCell.Value = 25 ActiveCell.Offset(1, 0).Select Loop Selection.Font.Bold = Not Selection.Font.Bold ' el Not hace la negacion de la misma instruccion End Sub

Sub Recorre2() Range("B5").Select Do Until ActiveCell.Value = "" If ActiveCell.Value = 25 Then Selection.Font.Bold = Not Selection.Font.Bold ActiveCell.Offset(1, 0).Select Loop End Sub

Sub NegritaHojas() For x = 1 To Sheets.Count Sheets(x).Select Rows("1:1").Select Selection.Font.Bold = True Next End Sub

Sub Actualizar() ' Macro16 Macro Rows("60:60").EntireRow.Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Range("A1").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Criterios", RefersToR1C1:=Selection.CurrentRegion '"=Hoja1!R1C1:R2C14" Range("A6").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Tabla", RefersToR1C1:=Selection.CurrentRegion Range("A6").Select Range("Zona_Tabla").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range("Zona_Criterios"), CopyToRange:=Range("A60"), Unique:=False End Sub

Sub Filtro_Avanzado() ' Filtro_Avanzado Macro Range("A6").Select Selection.CurrentRegion.Select Range("A6:N56").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _ "Hoja1!Criteria"), CopyToRange:=Range("A60"), Unique:=False End Sub Sub Actualizar() ' Actualizar Macro Rows("60:60").Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Range("A1").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Criterios", RefersToR1C1:= _ Selection.CurrentRegion Range("A6").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Tabla", RefersToR1C1:= _ Selection.CurrentRegion Range("A6").Select Range("Zona_Tabla").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _ Range("Zona_Criterios"), CopyToRange:=Range("A60"), Unique:=False End Sub

Sub Copiar_Nombre_Apellido() Sheets("Hoja 1").Select Range("C2").Select Do Until AcvtiveCell.Value = "" Range("A2").Select If ActiveCell.Value = "x" Then Selection.Font.Bold ActiveCell.Offset(1, 0).Select End If Loop Rows("60:60").Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Range("A1").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Criterios", RefersToR1C1:= _ Selection.CurrentRegion Range("A6").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="Zona_Tabla", RefersToR1C1:= _ Selection.CurrentRegion Range("A6").Select Range("Zona_Tabla").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _ Range("Zona_Criterios"), CopyToRange:=Range("A60"), Unique:=False End Sub

Вам также может понравиться