MarinheiroQ
New Member
- Joined
- Nov 11, 2021
- Messages
- 7
- Office Version
- 2013
- Platform
- Windows
Hello,
I'm looking for a macro where I can provide the range of cells in a sheet for the macro to look through and change the color of certain words. One more feauture I need is that the macro detects a symbol (for example $) and changes the color of the text after that symbol and then erases the symbol. I need it to work with my already existing macro which ill leave below. Im using these macros with a button. Thank you !
Sub Macro1()
Range("H1", "H9999").Clear
Range("I1", "I9999").Clear
Range("J1", "J9999").Clear
Range("K1", "K9999").Clear
Range("L1", "L9999").Clear
Range("M1", "M9999").Clear
Range("N1", "N9999").Clear
Range("O1", "O9999").Clear
Range("P1", "P9999").Clear
Range("Q1", "Q9999").Clear
Range("R1", "R9999").Clear
Range("S1", "S9999").Clear
Range("T1", "T9999").Clear
Range("U1", "U9999").Clear
Range("V1", "V9999").Clear
Range("W1", "W9999").Clear
Range("V1", "V9999").Clear
Range("X1", "X9999").Clear
Range("E5", "E1000").Font.Size = 9
Range("F5", "F1000").Font.Size = 9
Range("G5", "G1000").Font.Size = 9
Range("E5", "E1000").Font.Name = "cambria"
Range("F5", "F1000").Font.Name = "cambria"
Range("G5", "G1000").Font.Name = "cambria"
Range("E5", "E1000").Borders.LineStyle = xlContinuous
Range("F5", "F1000").Borders.LineStyle = xlContinuous
Range("G5", "G1000").Borders.LineStyle = xlContinuous
Range("E5", "E1000").RowHeight = 15
Range("F5", "F1000").RowHeight = 15
Range("G5", "G1000").RowHeight = 15
Range("D5").CurrentRegion.Sort key1:=Range("D5"), ORDER1:=xlAscending, Header:=xlNo
On Error Resume Next
Columns.Range("G5", "G1000").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Columns.Range("F5", "F1000").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
I'm looking for a macro where I can provide the range of cells in a sheet for the macro to look through and change the color of certain words. One more feauture I need is that the macro detects a symbol (for example $) and changes the color of the text after that symbol and then erases the symbol. I need it to work with my already existing macro which ill leave below. Im using these macros with a button. Thank you !
Sub Macro1()
Range("H1", "H9999").Clear
Range("I1", "I9999").Clear
Range("J1", "J9999").Clear
Range("K1", "K9999").Clear
Range("L1", "L9999").Clear
Range("M1", "M9999").Clear
Range("N1", "N9999").Clear
Range("O1", "O9999").Clear
Range("P1", "P9999").Clear
Range("Q1", "Q9999").Clear
Range("R1", "R9999").Clear
Range("S1", "S9999").Clear
Range("T1", "T9999").Clear
Range("U1", "U9999").Clear
Range("V1", "V9999").Clear
Range("W1", "W9999").Clear
Range("V1", "V9999").Clear
Range("X1", "X9999").Clear
Range("E5", "E1000").Font.Size = 9
Range("F5", "F1000").Font.Size = 9
Range("G5", "G1000").Font.Size = 9
Range("E5", "E1000").Font.Name = "cambria"
Range("F5", "F1000").Font.Name = "cambria"
Range("G5", "G1000").Font.Name = "cambria"
Range("E5", "E1000").Borders.LineStyle = xlContinuous
Range("F5", "F1000").Borders.LineStyle = xlContinuous
Range("G5", "G1000").Borders.LineStyle = xlContinuous
Range("E5", "E1000").RowHeight = 15
Range("F5", "F1000").RowHeight = 15
Range("G5", "G1000").RowHeight = 15
Range("D5").CurrentRegion.Sort key1:=Range("D5"), ORDER1:=xlAscending, Header:=xlNo
On Error Resume Next
Columns.Range("G5", "G1000").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Columns.Range("F5", "F1000").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub