ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to combine two SpecialCells CellTypes? (https://www.excelbanter.com/excel-programming/315466-how-combine-two-specialcells-celltypes.html)

Stacy35216[_2_]

How to combine two SpecialCells CellTypes?
 

Thanks for the reply.

Unfortunately, there aren't always formula cells in the range.
In that case, Excel doesn't get past the line

Set rng2 = Range("A1:C25").SpecialCells(xlFormulas)

because it throws an error saying that no cells were found. I don'
know why it can't have a null set

--
Stacy3521
-----------------------------------------------------------------------
Stacy35216's Profile: http://www.excelforum.com/member.php...fo&userid=1595
View this thread: http://www.excelforum.com/showthread.php?threadid=27432


Ron de Bruin

How to combine two SpecialCells CellTypes?
 
Always use a on error with specialcells
See Norman's example


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Stacy35216" wrote in message ...

Thanks for the reply.

Unfortunately, there aren't always formula cells in the range.
In that case, Excel doesn't get past the line

Set rng2 = Range("A1:C25").SpecialCells(xlFormulas)

because it throws an error saying that no cells were found. I don't
know why it can't have a null set.


--
Stacy35216
------------------------------------------------------------------------
Stacy35216's Profile: http://www.excelforum.com/member.php...o&userid=15952
View this thread: http://www.excelforum.com/showthread...hreadid=274326





All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com