Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Import Problem

I am importing data from a lot of .xls files(over 100). The data
imports and goes to the apprioriate location. The problem I am
encountering is that I get blank rows. My spreadsheet will look
similar to this

ID Name Phone
1 Joe 555-5555
2 Joe 555-5555
3 Joe 555-5555


4 Joe 555-5555
5 Joe 555-5555

6 Joe 555-5555

7 Joe 555-5555
8 Joe 555-5555
9 Joe 555-5555

Like that with random empty rows. What would i add to my macro to
ignore rows that are blank???

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Import Problem


Hi wnureport

You have 2 choices;
1: You can do a sort first
2: You can do a macro
Sub test()
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 2 To rowcount
check_val = Range("a" & i).Value
If check_val < Empty Then
'do something
End If
Next
End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=556573

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Import Problem


Hi wnureport

You have 2 choices;
1: You can do a sort first
2: You can do a macro
Sub test()
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 2 To rowcount
check_val = Range("a" & i).Value
If check_val < Empty Then
'do something
End If
Next
End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=556573

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Import Problem


Hi wnureport

You have 2 choices;
1: You can do a sort first
2: You can do a macro
Sub test()
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 2 To rowcount
check_val = Range("a" & i).Value
If check_val < Empty Then
'do something
End If
Next
End Su

--
jette
-----------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...fo&userid=1753
View this thread: http://www.excelforum.com/showthread.php?threadid=55657

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Import Problem

Where are the blank rows coming from?
Without knowing the source it's difficult to suggest a fix...
Posting code always helps.

--
Tim Williams
Palo Alto, CA


"wmureports" wrote in message ups.com...
I am importing data from a lot of .xls files(over 100). The data
imports and goes to the apprioriate location. The problem I am
encountering is that I get blank rows. My spreadsheet will look
similar to this

ID Name Phone
1 Joe 555-5555
2 Joe 555-5555
3 Joe 555-5555


4 Joe 555-5555
5 Joe 555-5555

6 Joe 555-5555

7 Joe 555-5555
8 Joe 555-5555
9 Joe 555-5555

Like that with random empty rows. What would i add to my macro to
ignore rows that are blank???





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Import Problem

The blank rows are coming from the imported xls files. Each file has a
set number of rows, even if the rows are blank. So its copying all the
rows even if they are blank


Tim Williams wrote:
Where are the blank rows coming from?
Without knowing the source it's difficult to suggest a fix...
Posting code always helps.

--
Tim Williams
Palo Alto, CA


"wmureports" wrote in message ups.com...
I am importing data from a lot of .xls files(over 100). The data
imports and goes to the apprioriate location. The problem I am
encountering is that I get blank rows. My spreadsheet will look
similar to this

ID Name Phone
1 Joe 555-5555
2 Joe 555-5555
3 Joe 555-5555


4 Joe 555-5555
5 Joe 555-5555

6 Joe 555-5555

7 Joe 555-5555
8 Joe 555-5555
9 Joe 555-5555

Like that with random empty rows. What would i add to my macro to
ignore rows that are blank???


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
xml import problem MatthewG Excel Discussion (Misc queries) 0 February 10th 09 06:05 PM
Import Problem Pepper New Users to Excel 2 November 21st 08 10:52 PM
Import problem µ New Users to Excel 0 April 24th 07 10:27 AM
Import problem Ted Rogers New Users to Excel 9 July 14th 05 10:52 PM
Import Data Problem Eamon Excel Discussion (Misc queries) 1 March 12th 05 10:48 PM


All times are GMT +1. The time now is 07:38 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"