Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am having an issue with a macro that I wrote, it takes a range 236row by 100 columns and then creates a new range that is only cells wit values in them, or rather it removes all the blanks (Which their ten to be quite a bit). Excel crashes consistently when I am running this If there is a max, what is it? Maybe there is a better way for me t approach this problem. Thank you in advance for your help, The code for removing the blanks is as follows... The CombineRang function acts much like Union, but It checks to make sure tha RemoveBlanks and CurrCell are in fact already ranges. Function RemoveBlanks(myRange As Range) As Range Dim CurrCell As Range For Each CurrCell In myRange If Not Len(CurrCell.Formula) = 0 Then Set RemoveBlanks = CombineRange(RemoveBlanks, CurrCell) End If Next ErrHandler: With Err If Not .Number = 0 Then .Raise .Number, "mdlFormat:RemoveBlanks" & vbCrLf & .Source .Description End If End With End Functio -- kralj ----------------------------------------------------------------------- kraljb's Profile: http://www.excelforum.com/member.php...nfo&userid=995 View this thread: http://www.excelforum.com/showthread.php?threadid=39516 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count the number of cells that conatin a "." in a range | Excel Worksheet Functions | |||
Using "=randbetween" to select a number from a range of cells | Excel Worksheet Functions | |||
Multiple "Range" with "Cells" property? | Excel Programming | |||
Multiple "Range" with "Cells" property? | Excel Programming | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming |