Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CHARI
 
Posts: n/a
Default CELL IS BLANK BUT NEED IT FILLED WITH SPACES TO A SPECIFIC LENGTH

IN EXCEL, HOW DO I SHOW A CELL THAT IS EMPTY AS HAVING IT FILLED WITH SPACES
AND HAVING A PARTICULAR LENGTH (FOR EXAMPLE 35). I NEED THIS FOR A CLIPBOARD
AND IF THE DOESN'T COUNT THE SPACES, IT THROWS OFF THE POSITION OF THE NEXT
CELL
  #2   Report Post  
CHARI
 
Posts: n/a
Default

I'm not familiar enough with macros. Is there another way?

"CHARI" wrote:

IN EXCEL, HOW DO I SHOW A CELL THAT IS EMPTY AS HAVING IT FILLED WITH SPACES
AND HAVING A PARTICULAR LENGTH (FOR EXAMPLE 35). I NEED THIS FOR A CLIPBOARD
AND IF THE DOESN'T COUNT THE SPACES, IT THROWS OFF THE POSITION OF THE NEXT
CELL

  #3   Report Post  
מיכאל (מיקי) אבידן
 
Posts: n/a
Default

Well, you may consider using the function REPLACE.
1. Leave the column "A" empty.
2. In cell B1 type: =REPLACE(A1,1,10,"xxxxxxxxxx...")
*** where instead of the xxxxx you will type 35 spaces !
3. Drag (copy) that formula down to where ever you need.
4. Select the WHOLE range in column "B" and pres Ctrl+C (Copy)
5. Move to cell C1 and in the main menu: Edit Paste Special mark the
redio button "Values" OK.
*** Column "C" has 35 spaces in each Cell.
Please forgive my bad English as it is not my mothers tounge.
Michael Avidan - ISRAEL
http://forums.tapuz.co.il/office

"CHARI" wrote:

I'm not familiar enough with macros. Is there another way?

"CHARI" wrote:

IN EXCEL, HOW DO I SHOW A CELL THAT IS EMPTY AS HAVING IT FILLED WITH SPACES
AND HAVING A PARTICULAR LENGTH (FOR EXAMPLE 35). I NEED THIS FOR A CLIPBOARD
AND IF THE DOESN'T COUNT THE SPACES, IT THROWS OFF THE POSITION OF THE NEXT
CELL

  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Or the somewhat shorter

=REPT(" ",35)

although I doubt it is a good idea to use spaces for layout as the OP wants

--
Regards,

Peo Sjoblom

(No private emails please)


"מיכאל (מיקי) אבידן" wrote in message
...
Well, you may consider using the function REPLACE.
1. Leave the column "A" empty.
2. In cell B1 type: =REPLACE(A1,1,10,"xxxxxxxxxx...")
*** where instead of the xxxxx you will type 35 spaces !
3. Drag (copy) that formula down to where ever you need.
4. Select the WHOLE range in column "B" and pres Ctrl+C (Copy)
5. Move to cell C1 and in the main menu: Edit Paste Special mark the
redio button "Values" OK.
*** Column "C" has 35 spaces in each Cell.
Please forgive my bad English as it is not my mothers tounge.
Michael Avidan - ISRAEL
http://forums.tapuz.co.il/office

"CHARI" wrote:

I'm not familiar enough with macros. Is there another way?

"CHARI" wrote:

IN EXCEL, HOW DO I SHOW A CELL THAT IS EMPTY AS HAVING IT FILLED WITH
SPACES
AND HAVING A PARTICULAR LENGTH (FOR EXAMPLE 35). I NEED THIS FOR A
CLIPBOARD
AND IF THE DOESN'T COUNT THE SPACES, IT THROWS OFF THE POSITION OF THE
NEXT
CELL


  #5   Report Post  
Gord Dibben
 
Posts: n/a
Default

Chari

You should become familiar with macros if you intend to utilize all the power
of Excel.

Visit David McRitchie's site on getting started.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

There are other ways..........

In the empty cell enter this formula =REPT(CHAR(32),35)

This will enter 35 spaces in the cell.

Now copy the cell and Paste SpecialValuesOKEsc.

The 35 spaces will remain.

OR, simply enter 35 spaces in a cell then copy that cell to other blank cells.

As you can see, the macro would be much easier......no formulas, no copying
and pasting.

To use the macro given by Michael......with the worksbook open, hit ALT + F11
the CTRL + r to open the Project Explorer.

Select your workbook/project and right-clickInsertModule.

Paste the lines of code in there.

ALT + Q to go back to Excel then ToolsMacroMacros.

Select the macro and "Run" on any empty cell you have selected.

When/if happy, save the workbook.

For improvments, I would suggest this change in code.

Sub SP()
For Each rcell In Selection
rcell.Value = Space(35)
Next rcell
End Sub

Stick that into the module instead of Michaels's original code.

Select the empty cells, either manually one at a time using CTRL and point or
select a range then F5SpecialBlanksOK.

Run the macro on that selection.


Gord Dibben Excel MVP

On Mon, 29 Aug 2005 14:47:14 -0700, "CHARI"
wrote:

I'm not familiar enough with macros. Is there another way?

"CHARI" wrote:

IN EXCEL, HOW DO I SHOW A CELL THAT IS EMPTY AS HAVING IT FILLED WITH SPACES
AND HAVING A PARTICULAR LENGTH (FOR EXAMPLE 35). I NEED THIS FOR A CLIPBOARD
AND IF THE DOESN'T COUNT THE SPACES, IT THROWS OFF THE POSITION OF THE NEXT
CELL


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
leave a cell blank nicolas Excel Worksheet Functions 1 August 2nd 05 01:55 PM
blank cell turns to 0 LMB New Users to Excel 2 April 25th 05 03:57 PM
Custom format that shows blank cell if another cell is empty Zdenek Moravec Excel Discussion (Misc queries) 1 March 25th 05 11:45 AM
conditional formating for a blank cell wsoung Excel Discussion (Misc queries) 5 March 9th 05 10:15 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"