Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Exporting a worksheet with blank/empty cells

I have a worksheet with 10,000 rows and 10 columns. In one of those columns
about 25% of the cells are empty. When I export the worksheet in a tab
delimited file those blank cells are simply omitted, so in those cases the
output record only has nine fields.

I need either to put something (the data in the column is numeric but always
=0) to indicate a blank (say -1) or to find some way to make the data export

put in two consecutive tabs with a blank between them representing the blank
cell.

Either solution would be OK, but I sort of prefer filling in the fields.
--
Thanks for your help - jjk98
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Exporting a worksheet with blank/empty cells

hi,
here is a ditty that might hellp....
Sub fillrange()
Dim r As Range
Dim rn As Range
Set r = Cells(1, 3)

For i = 1 To 10000 ' or whatever
Set rn = r.Offset(1, 0)
If IsEmpty(r) Then
r.Value = 0 ' or whatever
End If
Set r = rn
Next i
End Sub
adjust to fit your data/needs
Regards
FSt1

"jjk98" wrote:

I have a worksheet with 10,000 rows and 10 columns. In one of those columns
about 25% of the cells are empty. When I export the worksheet in a tab
delimited file those blank cells are simply omitted, so in those cases the
output record only has nine fields.

I need either to put something (the data in the column is numeric but always
=0) to indicate a blank (say -1) or to find some way to make the data export

put in two consecutive tabs with a blank between them representing the blank
cell.

Either solution would be OK, but I sort of prefer filling in the fields.
--
Thanks for your help - jjk98

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Exporting a worksheet with blank/empty cells

Thans for your help, tried it and works fine!



"FSt1" wrote:

hi,
here is a ditty that might hellp....
Sub fillrange()
Dim r As Range
Dim rn As Range
Set r = Cells(1, 3)

For i = 1 To 10000 ' or whatever
Set rn = r.Offset(1, 0)
If IsEmpty(r) Then
r.Value = 0 ' or whatever
End If
Set r = rn
Next i
End Sub
adjust to fit your data/needs
Regards
FSt1

"jjk98" wrote:

I have a worksheet with 10,000 rows and 10 columns. In one of those columns
about 25% of the cells are empty. When I export the worksheet in a tab
delimited file those blank cells are simply omitted, so in those cases the
output record only has nine fields.

I need either to put something (the data in the column is numeric but always
=0) to indicate a blank (say -1) or to find some way to make the data export

put in two consecutive tabs with a blank between them representing the blank
cell.

Either solution would be OK, but I sort of prefer filling in the fields.
--
Thanks for your help - jjk98

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
Save As .XML, not exporting blank cells roblo Excel Discussion (Misc queries) 2 January 4th 06 03:09 PM
Excel - Autom. Filter "Empty / Non Empty cells" should come first Rom Excel Discussion (Misc queries) 0 August 10th 05 04:32 PM
Pivot table blank/empty cells Alan Synnott Excel Discussion (Misc queries) 1 August 3rd 05 01:37 PM
How can I convert empty strings to empty cells? Shane Excel Discussion (Misc queries) 2 July 19th 05 12:10 PM
?? Extra blank lines in 'address' cell after exporting to Excel Hadyn Pkok Excel Discussion (Misc queries) 4 April 15th 05 11:34 PM


All times are GMT +1. The time now is 09:26 PM.

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

About Us

"It's about Microsoft Excel"