Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
xml import problem | Excel Discussion (Misc queries) | |||
Import Problem | New Users to Excel | |||
Import problem | New Users to Excel | |||
Import problem | New Users to Excel | |||
Import Data Problem | Excel Discussion (Misc queries) |