Hello all ,
I am needing a fast working macro that can remove in col G all numbers >=3 and leave cells blank , but leave behind all T and L .
Thanks .
Hello all ,
I am needing a fast working macro that can remove in col G all numbers >=3 and leave cells blank , but leave behind all T and L .
Thanks .
I am grateful for all answers to my questions .
Also i give a reputation even if not answered .
Can you have numbers < 3 that need to be kept?
Try
Please Login or Register to view this content.
Last edited by PCI; 11-10-2019 at 04:50 PM.
- Battle without fear gives no glory - Just try
Judging by a previous post all your numbers will be >=3, in which case you can usePlease Login or Register to view this content.
Thanks for reply , there will not be any numbers <=2 .
Other words there are no 1,s or 2,s there at all , these are referred to as T and L which are to be left only .
Thanks .
there are no 1,s or 2,s
So here a remake
Please Login or Register to view this content.
Fluff13 , yours deletes everything in col G .
PCI your first one went error yellow on line
Range(Cells(1, "G"), Cells(Rows.Count, "G").End(3)).SpecialCells(xlCellTypeVisible).ClearContents
And your 2nd one did nothing except remove all my headings
Also im testing on a 490,000 row sheet .
Thanks .
A remake with no test with so many rows ...!
Please Login or Register to view this content.
That one just took the filter off the headings . Thanks .
Can you just do a firsttest with the file you attached.
BTW your file did not have any 1's and 2's ...!
Same player shot again
Another one perhaps it takes time ...!
Please Login or Register to view this content.
*** CORRECTION ***
It has been too many years since I had to deal with this and I had remembered incorrectly... the limit for Excel prior to 2010 is not 8000+ cells, it is 8000+ (actually, 8192) non-contiguous ranges (Areas) no matter how many cells are in each Area. So I am guessing the OP has blank rows (lots of them) within his 490,000 rows of data. Here is a mini-blog article I wrote about this (with a method to get around the limit) several years ago...
http://www.excelfox.com/forum/showth...Cells-Function
Last edited by Rick Rothstein; 11-10-2019 at 06:29 PM.
Try this:
I assumed the values of column G are only numbers or "T" or "L".
The code will sort the data by col G in descending order then remove all rows below the last "L".
Edit:Please Login or Register to view this content.
If you only want to clear the content of col G, use this one:
Please Login or Register to view this content.
Last edited by Akuini; 11-10-2019 at 07:11 PM.
Hi,
Like Rick yet wrote, I confirm for SpecialCells, maybe the most vicious VBA method as not only 'cause of its results limit
but as it no raises any error if there are more results than its limit, can be messy ! …
See if this works faster...
Please Login or Register to view this content.
Last edited by jindon; 11-11-2019 at 02:09 AM.
... and ... : ) ... :
Please Login or Register to view this content.
Try this code.It is fastest.
Please Login or Register to view this content.
Last edited by kvsrinivasamurthy; 11-11-2019 at 02:25 AM.
Pl note
Array formula should be confirmed with Ctrl+Shift+Enter keys together.
If answere is satisfactory press * to add reputation.
Thx again Rick:
for the information and to take care until the last detail
WBDPlease Login or Register to view this content.
Office 365 on Windows 11, looking for ✶ rep!
thanks to all
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks