Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Finding Blanks in list

Dim rng as Range, rng1 as Range
set rng = Range(Cells(1,1),Cells(1,1).End(xldown))
On error resume Next
set rng1 = rng.offset(0,1).Resize(,2).SpecialCells(xlBlanks)
On Error goto 0
if not rng1 is nothing then
rng1.EntireRow.copy Destination:=Worksheets(2).Range("A1")
End if

--
Regards,
Tom Ogilvy


"Jahsonn" wrote in message
...
I have a list of data as such.

112526 name
254412 name

125421 name
254412 name

254412

The first column will always have a value in it but the
second and third columns may not have values in them. Is
it possible to have a macro run down the list and any
items which it doesnt have values in columns b and c to
copy to another sheet?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Finding Blanks in list

Hi Tom

Thanks for the speedy response, This works perfectly but
the problem i am having is that the cells is the sheet
that I am checking to see if they are blank actually have
formulas in them which are set to display nothing if there
is an error. Is there any way to change this so it doesnt
look at the formulas?

Thanks


-----Original Message-----
Dim rng as Range, rng1 as Range
set rng = Range(Cells(1,1),Cells(1,1).End(xldown))
On error resume Next
set rng1 = rng.offset(0,1).Resize(,2).SpecialCells

(xlBlanks)
On Error goto 0
if not rng1 is nothing then
rng1.EntireRow.copy Destination:=Worksheets(2).Range

("A1")
End if

--
Regards,
Tom Ogilvy


"Jahsonn" wrote in

message
...
I have a list of data as such.

112526 name
254412 name

125421 name
254412 name

254412

The first column will always have a value in it but the
second and third columns may not have values in them. Is
it possible to have a macro run down the list and any
items which it doesnt have values in columns b and c to
copy to another sheet?




.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Finding Blanks in list

no, you would need to loop in that case. unless you change your formulas to
=if(condition,formula,na())

so rather than be blank, they return errors. Then you could change xlblanks
to xlformulas,xlerrors

--
Regards,
Tom Ogilvy


"Jahsonn" wrote in message
...
Hi Tom

Thanks for the speedy response, This works perfectly but
the problem i am having is that the cells is the sheet
that I am checking to see if they are blank actually have
formulas in them which are set to display nothing if there
is an error. Is there any way to change this so it doesnt
look at the formulas?

Thanks


-----Original Message-----
Dim rng as Range, rng1 as Range
set rng = Range(Cells(1,1),Cells(1,1).End(xldown))
On error resume Next
set rng1 = rng.offset(0,1).Resize(,2).SpecialCells

(xlBlanks)
On Error goto 0
if not rng1 is nothing then
rng1.EntireRow.copy Destination:=Worksheets(2).Range

("A1")
End if

--
Regards,
Tom Ogilvy


"Jahsonn" wrote in

message
...
I have a list of data as such.

112526 name
254412 name

125421 name
254412 name

254412

The first column will always have a value in it but the
second and third columns may not have values in them. Is
it possible to have a macro run down the list and any
items which it doesnt have values in columns b and c to
copy to another sheet?




.



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
Finding MIN across worksheets while excluding blanks Alison Excel Worksheet Functions 2 November 23rd 08 08:47 PM
Help with sorting blanks out of a list Susienak Excel Discussion (Misc queries) 3 November 17th 07 07:53 AM
Condense out blanks in a list Matt Excel Discussion (Misc queries) 3 July 31st 07 01:00 AM
Finding Blanks in list Jahsonn Excel Programming 1 April 3rd 04 06:06 PM
Finding blanks in dynamic ranges Ken McLennan[_3_] Excel Programming 2 February 25th 04 09:19 AM


All times are GMT +1. The time now is 09:22 AM.

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"