Forum Discussion
bradpeterson
Jul 21, 2020Copper Contributor
excel function replace all letters in document with numbers automatically
Hello, I'm in need of some help and I cannot find a solution online. I have a document that has uniform sizes. i.e. S, M, L, XL I need to replace those sizes automatically: S=1, M=2, L=3, xl...
NikolinoDE
Jul 21, 2020Platinum Contributor
With VBA
Sub Row_Column_width()
With Sheets("69")
.Rows("50:50").RowHeight = 63.75
.Columns("A:A").ColumnWidth = 4
.Columns("B:H").ColumnWidth = 1.86
.Columns("I:I").ColumnWidth = 35.14
.Columns("J:J").ColumnWidth = 14.71
.Columns("K:K").ColumnWidth = 13
.Columns("L:L").ColumnWidth = 12.86
.Columns("M:M").ColumnWidth = 30
End With
End Sub
If you liked my solution, I would be happy to receive a reply with a cross as the correct answer and a thumbs up. If it is not an option, please ignore or inform.
Nikolino
I know I don't know anything (Socrates)
Sub Row_Column_width()
With Sheets("69")
.Rows("50:50").RowHeight = 63.75
.Columns("A:A").ColumnWidth = 4
.Columns("B:H").ColumnWidth = 1.86
.Columns("I:I").ColumnWidth = 35.14
.Columns("J:J").ColumnWidth = 14.71
.Columns("K:K").ColumnWidth = 13
.Columns("L:L").ColumnWidth = 12.86
.Columns("M:M").ColumnWidth = 30
End With
End Sub
If you liked my solution, I would be happy to receive a reply with a cross as the correct answer and a thumbs up. If it is not an option, please ignore or inform.
Nikolino
I know I don't know anything (Socrates)
Riny_van_Eekelen
Jul 21, 2020Platinum Contributor
NikolinoDE ??
- NikolinoDEJul 21, 2020Platinum ContributorHere ๐
hope I did nothing wrong ...- Riny_van_EekelenJul 21, 2020Platinum Contributor
NikolinoDE Don't really know what your intentions are, but you are certainly not responding to the issue in this thread.
- NikolinoDEJul 21, 2020Platinum ContributorHi Riny_van_Eekelen,
Are you sure about that?
As I understood it from the translation (I speak mainly German that does not mean that I canโt speak some other languages), you want to have columns in different widths with VBA.
That's exactly what I did, and at the same time I also showed an additional option.
Therefore I do not understand your suggestion.
Just try to help as far as I can, despite my ignorance ... because the principle is "help to be helped", so the helped can learn something new and who helped to gain some experience.
But as I said, do not want step anyone too close
and if I have disturbed anyone with my comments, please forgive me
... because there was certainly no intention.
Nikolino
Do not look for mistakes, look for solutions.
Henry Ford