I would like to format a excel file to "General", but it's not working for all cells (some are custom, pourcentage...). here is my code :
With ActiveSheet.Range("A1").Resize(LineIndex, 1)
.Value = WorksheetFunction.Transpose(strLine)
.NumberFormat = "General"
'DEFINE THE OPERATION FULLY!!!!
.TextToColumns Destination:=.Cells(1), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, _
Tab:=False, Semicolon:=False, Comma:=False, Space:=False, _
Other:=True, OtherChar:="|"
help please.
Highlight a cell in the left column of your table. On the Home section of the ribbon, click Conditional Formatting , then New Rule . Use a formula to determine which cells to format . Click Format and set Number to Currency , then click OK.
If you want to format all cells to General, then use something like:
Sub dural()
ActiveSheet.Cells.NumberFormat = "General"
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With