Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-26-2015, 05:19 AM
vibor vibor is offline Delete row with empty cel in a table Windows XP Delete row with empty cel in a table Office 2003
Novice
Delete row with empty cel in a table
 
Join Date: Feb 2015
Posts: 5
vibor is on a distinguished road
Post Delete row with empty cel in a table

Hello,

A process is filling a words document (MS Words 2007).
A table in this document has 60 row's. Depending on the process there are 1 or all 60 rows filled.
Every cell has a bookmark. (3 cells in a row, number, problem, solution)


I know how to find the cells and how to select and delete the row.
I want delete the empty rows starting at the end.
When there is data/content, than stop macro.

My problem is:
1 How do I check the cell if its empty?
2 Do I have to repeat the routine 60 times, or is there a other way?
This is what I have:

Sub DeleteLegeRegel()
Selection.GoTo What:=wdGoToBookmark, Name:="Prob60"

(CHECK CEL FOR DATA, HOW?)

If empty Then
Selection.Expand (wdRow)
Selection.Cut
Selection.GoTo What:=wdGoToBookmark, Name:="Prob59"
(CHECK CEL FOR DATA, HOW?)

If empty Then
Selection.Expand (wdRow)
Selection.Cut
Selection.GoTo What:=wdGoToBookmark, Name:="Prob58"


Else
Selection.GoTo What:=wdGoToBookmark, Name:="Prob59"

End If

End Sub


It shout be simple, but I can't find a proper example.

Grtz Vincent
Reply With Quote
 

Tags
empty cell delete row

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete row with empty cel in a table Macro to delete all empty rows from all tables braddgood Word VBA 15 10-02-2015 01:54 PM
Delete row with empty cel in a table Delete empty cell and shift up Linh Word Tables 1 09-21-2014 01:52 PM
Creating VBA Code to Delete Empty Column in Table Faugs Word VBA 5 08-07-2014 03:29 PM
Delete lots of empty space between paragraphs. FieldTechnician Word 4 10-25-2013 01:14 PM
Delete row with empty cel in a table Macro to delete rows with all empty cells ubns Excel Programming 2 08-14-2012 02:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft