PDA

View Full Version : UsedRange Not Working As Expected



littleiitin
05-20-2012, 11:20 AM
Hi All,

I have seen some unwanted behavior of



ActiveSheet.UsedRange.Select


Initially it was my thinking that this code will Select full range ever used. Even it is blank.
But I have seen that it is not true it will select only those ranges which are currently in use.
However I have seen another instance where some blank range also get selected along with data which was used some time before but this time it was blank.
But it was not selecting the blank but already used range which was away or you can say dis-continous with current datarange.

Please share your thoughts.
and Let me correct if I am wrong in of these points.

Thanks
Rahul Kumar Singh

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg.A0opm95t2XEA0q3Kshmu uY (https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg.A0opm95t2XEA0q3Kshmu uY)
https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg (https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837)
https://www.eileenslounge.com/viewtopic.php?f=21&t=40701&p=314836#p314836 (https://www.eileenslounge.com/viewtopic.php?f=21&t=40701&p=314836#p314836)
https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314621#p314621 (https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314621#p314621)
https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314619#p314619 (https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314619#p314619)
https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314600#p314600 (https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314600#p314600)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

Rick Rothstein
05-20-2012, 01:59 PM
This was my take on the problem...

Replacement for the Flawed UsedRange Property (http://www.excelfox.com/forum/f22/replacement-flawed-usedrange-property-374/)

Be sure to read the follow-up discussion in the thread as well.

littleiitin
05-20-2012, 04:16 PM
Hi Rick,

The above discussion is really very helpful.


Thanks
Rahul Kumar Singh