![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
I've got a bunch of text in a cell and i'd like to cut it down from 100 characters to 30... can i do this automatically and with multiple rows at once?
|
|
|
|
|
|
#2 |
|
Join Date: Apr 2002
Posts: 12
|
Do you mean you want to delete any text in excess of 30 characters, or do you want to wrap the text so that it is only 30 characters wide?
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
If you want to reduce the character size, then select the cell or cells that you want to operate on, then go to the formatting tool bar and reduce the font size. If you want to reduce the number of characters in the cell from 100 to 30, then you will need to use a formula in an adjacent cell =LEFT(A1,30) A little clearer explanation what you are trying to accomplish will help!
__________________
Regards! Yogi Anand, D.Eng, P.E. Energy Efficient Building Network LLC www.energyefficientbuild.com |
|
|
|
|
|
|
#4 | |
|
Board Regular
Join Date: Mar 2002
Posts: 1,805
|
Quote:
From your menu you can use: Data | Text to colunns, which opens a wizard. Follow the steps. You can choose to import a fixed width text by marking the desired length. Eli |
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Thank you for responding. I'll try to be more specific. I only want 30 characters total in the cell...anything past that should be ignored/discarded. Thanks again
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi Gruv
Select the cells in question and then run this macro... Sub DownText() Dim c As Object For Each c In Selection If Len(c.Value) > 30 Then c.Value = Left(c.Value, 30) Next End Sub Tom |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Feb 2002
Posts: 202
|
gruvinonu
yogi's solution will do that. [ This Message was edited by: anno on 2002-04-22 20:56 ] |
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
I know...
Will not need any formulas this way, however. |
|
|
|
|
|
#9 | |
|
Board Regular
Join Date: Feb 2002
Posts: 202
|
Quote:
this comment was for gruvinonu - i wasn't criticising your idea |
|
|
|
|
|
|
#10 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
No problem Anno...
Yogi has helped me out more than once. If someone will not take the time to post a few details, I don't spend alot of time with a solution... The little macro seemed to be the easiest way for me to help the guy. Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|