Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 2 cells ETWS.Cells(j, i) & ETWS.Cells(1, i).
I compare the text width of this two cells, if cells(j,i) is larger than the (1,i) then the columns width of column i is equal to textwidth of cells(j,i). How can i do that ? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With ETWS
If .Cells(j,i).ColumnWidth .Cells(1,i).ColumnWidth Then .Cells(1,i).ColumnWidth = .Cells(j,i).ColumnWidth End If End With -- HTH RP (remove nothere from the email address if mailing direct) "WilliamMomo" wrote in message ... I have 2 cells ETWS.Cells(j, i) & ETWS.Cells(1, i). I compare the text width of this two cells, if cells(j,i) is larger than the (1,i) then the columns width of column i is equal to textwidth of cells(j,i). How can i do that ? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Although its not work, also said thx.
"Bob Phillips" wrote: With ETWS If .Cells(j,i).ColumnWidth .Cells(1,i).ColumnWidth Then .Cells(1,i).ColumnWidth = .Cells(j,i).ColumnWidth End If End With -- HTH RP (remove nothere from the email address if mailing direct) "WilliamMomo" wrote in message ... I have 2 cells ETWS.Cells(j, i) & ETWS.Cells(1, i). I compare the text width of this two cells, if cells(j,i) is larger than the (1,i) then the columns width of column i is equal to textwidth of cells(j,i). How can i do that ? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perhaps you want to compare the number of characters, and if (j,i) has more
then autofit the column. With ETWS If Len(.Cells(j, i)) Len(.Cells(1, i)) Then Columns(i).AutoFit End If End With Mike F "WilliamMomo" wrote in message ... Although its not work, also said thx. "Bob Phillips" wrote: With ETWS If .Cells(j,i).ColumnWidth .Cells(1,i).ColumnWidth Then .Cells(1,i).ColumnWidth = .Cells(j,i).ColumnWidth End If End With -- HTH RP (remove nothere from the email address if mailing direct) "WilliamMomo" wrote in message ... I have 2 cells ETWS.Cells(j, i) & ETWS.Cells(1, i). I compare the text width of this two cells, if cells(j,i) is larger than the (1,i) then the columns width of column i is equal to textwidth of cells(j,i). How can i do that ? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thx alot for help i solve the problem la.
"Mike Fogleman" wrote: Perhaps you want to compare the number of characters, and if (j,i) has more then autofit the column. With ETWS If Len(.Cells(j, i)) Len(.Cells(1, i)) Then Columns(i).AutoFit End If End With Mike F "WilliamMomo" wrote in message ... Although its not work, also said thx. "Bob Phillips" wrote: With ETWS If .Cells(j,i).ColumnWidth .Cells(1,i).ColumnWidth Then .Cells(1,i).ColumnWidth = .Cells(j,i).ColumnWidth End If End With -- HTH RP (remove nothere from the email address if mailing direct) "WilliamMomo" wrote in message ... I have 2 cells ETWS.Cells(j, i) & ETWS.Cells(1, i). I compare the text width of this two cells, if cells(j,i) is larger than the (1,i) then the columns width of column i is equal to textwidth of cells(j,i). How can i do that ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
putting 2 long columns into multiple columns in excel page and sor | Excel Discussion (Misc queries) | |||
Excel 2003 - change columns to rows and rows to columns | Excel Discussion (Misc queries) | |||
"Text to Columns" for many columns in Excel 2003 | Excel Discussion (Misc queries) | |||
unable to insert columns in excel, insert- columns (disabled) | Excel Discussion (Misc queries) | |||
Excel button :: Filter columns by value - possible? Additionally, hide certain columns | Excel Programming |