A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Deleting multiples BLANK cells



 
 
Thread Tools Display Modes
  #1  
Old January 30th, 2007, 01:09 PM posted to microsoft.public.word.tables
delage
external usenet poster
 
Posts: 4
Default Deleting multiples BLANK cells

Hi, I have a very - veeery huge table, which became from an Excell worksheet.
But I have, in the past, removed the contents of several cells which are bank
now. As this document is in fact a label archive, now when I print it, there
is a lot of blank labels in the middle of the documet. I have tried to delent
ONLY the blank fields, but the only way I found is deleting one in eache
time, - and I have more that 300 blank cells!!! How can I do to delete the
blank cells, all in one time, maintaining the structure and shape of the
table, to be sure that labels will be perfectly printed in the future - but
without the blank labels?
  #2  
Old January 30th, 2007, 01:28 PM posted to microsoft.public.word.tables
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Deleting multiples BLANK cells

See http://www.gmayor.com/convert_labels...mail_merge.htm then
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


delage wrote:
Hi, I have a very - veeery huge table, which became from an Excell
worksheet. But I have, in the past, removed the contents of several
cells which are bank now. As this document is in fact a label
archive, now when I print it, there is a lot of blank labels in the
middle of the documet. I have tried to delent ONLY the blank fields,
but the only way I found is deleting one in eache time, - and I have
more that 300 blank cells!!! How can I do to delete the blank cells,
all in one time, maintaining the structure and shape of the table, to
be sure that labels will be perfectly printed in the future - but
without the blank labels?



  #3  
Old January 30th, 2007, 01:40 PM posted to microsoft.public.word.tables
delage
external usenet poster
 
Posts: 4
Default Deleting multiples BLANK cells

Thank you, but it was not enough. Acctually, I have already "merged" the
document AND saver ad a simple word document - not "linked" to the original
excell arquive. Now, all I have is a HUGE table in a word document with a lot
of blank cells. And I cant "invert" the merge, returning to the excell,
because when I import the table to the excell, it goes as a list, with one
field over the other, in the same column...

"Graham Mayor" escreveu:

See http://www.gmayor.com/convert_labels...mail_merge.htm then
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


delage wrote:
Hi, I have a very - veeery huge table, which became from an Excell
worksheet. But I have, in the past, removed the contents of several
cells which are bank now. As this document is in fact a label
archive, now when I print it, there is a lot of blank labels in the
middle of the documet. I have tried to delent ONLY the blank fields,
but the only way I found is deleting one in eache time, - and I have
more that 300 blank cells!!! How can I do to delete the blank cells,
all in one time, maintaining the structure and shape of the table, to
be sure that labels will be perfectly printed in the future - but
without the blank labels?




  #4  
Old January 30th, 2007, 01:56 PM posted to microsoft.public.word.tables
Greg Maxey
external usenet poster
 
Posts: 171
Default Deleting multiples BLANK cells

I just threw this together so please test on a copy of your document
first:

Sub RefillTable()
Dim myArray() As String
Dim oTbl As Word.Table
Dim cCnt As Long
Dim i As Long
Dim txtCnt As Long
Dim oRng As Word.Range
Set oTbl = Selection.Tables(1)
cCnt = oTbl.Range.Cells.Count
ReDim myArray(cCnt - 1)
txtCnt = 0
For i = 1 To cCnt
Set oRng = oTbl.Range.Cells(i).Range
If oTbl.Range.Cells(i).Range.Text Chr(13) & Chr(7) Then
oRng.MoveEndWhile Cset:=Chr(13) & Chr(7), Count:=wdBackward
myArray(txtCnt) = oRng.Text
txtCnt = txtCnt + 1
oRng.Delete
End If
Set oRng = Nothing
Next
ReDim Preserve myArray(txtCnt)
For i = 0 To txtCnt
oTbl.Range.Cells(i + 1).Range.Text = myArray(i)
Next i
End Sub

On Jan 30, 8:09 am, delage wrote:
Hi, I have a very - veeery huge table, which became from an Excell worksheet.
But I have, in the past, removed the contents of several cells which are bank
now. As this document is in fact a label archive, now when I print it, there
is a lot of blank labels in the middle of the documet. I have tried to delent
ONLY the blank fields, but the only way I found is deleting one in eache
time, - and I have more that 300 blank cells!!! How can I do to delete the
blank cells, all in one time, maintaining the structure and shape of the
table, to be sure that labels will be perfectly printed in the future - but
without the blank labels?


  #5  
Old January 30th, 2007, 02:13 PM posted to microsoft.public.word.tables
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Deleting multiples BLANK cells

Have you actually read the first link?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


delage wrote:
Thank you, but it was not enough. Acctually, I have already "merged"
the document AND saver ad a simple word document - not "linked" to
the original excell arquive. Now, all I have is a HUGE table in a
word document with a lot of blank cells. And I cant "invert" the
merge, returning to the excell, because when I import the table to
the excell, it goes as a list, with one field over the other, in the
same column...

"Graham Mayor" escreveu:

See http://www.gmayor.com/convert_labels...mail_merge.htm then
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


delage wrote:
Hi, I have a very - veeery huge table, which became from an Excell
worksheet. But I have, in the past, removed the contents of several
cells which are bank now. As this document is in fact a label
archive, now when I print it, there is a lot of blank labels in the
middle of the documet. I have tried to delent ONLY the blank fields,
but the only way I found is deleting one in eache time, - and I have
more that 300 blank cells!!! How can I do to delete the blank cells,
all in one time, maintaining the structure and shape of the table,
to be sure that labels will be perfectly printed in the future - but
without the blank labels?



  #6  
Old January 30th, 2007, 03:06 PM posted to microsoft.public.word.tables
delage
external usenet poster
 
Posts: 4
Default Deleting multiples BLANK cells

yes, thank you. It is perfect. I will try!

"Graham Mayor" escreveu:

Have you actually read the first link?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


delage wrote:
Thank you, but it was not enough. Acctually, I have already "merged"
the document AND saver ad a simple word document - not "linked" to
the original excell arquive. Now, all I have is a HUGE table in a
word document with a lot of blank cells. And I cant "invert" the
merge, returning to the excell, because when I import the table to
the excell, it goes as a list, with one field over the other, in the
same column...

"Graham Mayor" escreveu:

See http://www.gmayor.com/convert_labels...mail_merge.htm then
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


delage wrote:
Hi, I have a very - veeery huge table, which became from an Excell
worksheet. But I have, in the past, removed the contents of several
cells which are bank now. As this document is in fact a label
archive, now when I print it, there is a lot of blank labels in the
middle of the documet. I have tried to delent ONLY the blank fields,
but the only way I found is deleting one in eache time, - and I have
more that 300 blank cells!!! How can I do to delete the blank cells,
all in one time, maintaining the structure and shape of the table,
to be sure that labels will be perfectly printed in the future - but
without the blank labels?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:45 PM.


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