I don't think so, still does not look right
or you are not telling me something
I am going jogging in the Sun
:)
Printable View
remember to take a pictures :)
I need to rewire my brain :cool:
I can't take my camera, because I jog fast and very hard, so I might break it. Here is pic from about 18 months ago after I first discovered my old train line. So then I stole some wood and pallets and made a nice secret place to sit.
https://i.postimg.cc/w16v0JRD/Pooh-B...ay-Station.jpg
I go there sometimes and drink Bier. Not often because always drinking beer is unhealthy. But when I do go I drink lots. I only did it 2 times this summer. Maybe in a few days before Summer end I will go again. Then I go with bike and trailer full with beer. Then I can take a new picture..
Just a suggestion, to make it easier for us both
Maybe make new text file, maybe just 30 lines.
Use just English characters
Choose data that test all filters
Then we can first, - forget VBA, forget PQ , and first do it manually so we are sure what results should be.
Then after try PQ and VBA
Just a suggestion, that’s all.
here is table from csv (100 rows)
with CF defined for each filter (hardcoded) then table filtered by No Color
The trick is that the filter should not be hardcoded
with rows counted manually
I don’t know anything about CF or Filters in Excel, so I don’t know what to do with any of that.
Never mind
That table looks the same as the Tables and the csv text files we have used so far.
https://i.postimg.cc/NLZV13CX/Tables-so-far.jpg
In that last file I added another worksheet, ManuellAlan copied the data range, and then did it all manually
, no VBA
, no PQ
, no CF, filter or anything
, just Alan and his hands very big brain.
Results from me doing it with just my brain and hands:
https://i.postimg.cc/Hr8Yt3jV/Alan-do-it-manually.jpg
_____ Workbook: test01.xlsx ( Using Excel 2010 32 bit )
Worksheet: ManuellAlan
Row\Col AI 2Filter name by ll and rr takes out 20 rows, so left with 80 3Then filter region by sh takes out 2 rows, so 78 left 4Then filter country by us takes out 3 rows, so I am left wir 75
Results from my VBA coding
For this filter set: https://i.postimg.cc/300cs1NW/Filter-Set.jpg
, I still get the same results as before: https://i.postimg.cc/bDB5VWzK/VBA-results.jpg
, and they are the same as when I did it all manually.
So, so far I think my VBA coding is giving the correct results.
CF - conditional formatting
Filter - filter each column by NoColor starting from far left
you just retyped in many words all what I show with one table
what is your office version?
could you write single, one step, code vba?
not like this where it is not clear what to do
Attachment 5530
At the moment I am mostly using Excel 2010.
(I also have and use 2003 2007 2010 2013)
Correct. I did it all manually, just to check again if my results were correct. That is all.
I did not know what to do with what you gave me ….
What was I supposed to do? ….I know you know, but ….. :)
The macro I wrote for you will not be shown in that list you showed,
So far, most of the macros I wrote for you should work automatically, ( this is what I tried to explain here: https://www.excelfox.com/forum/showt...ll=1#post23239 )
The macros should work automatically. They start when you do something in the first worksheet, Filters
You cannot run them when you want to. It is not difficult to arrange that. But it is not what you originally asked for. You know what you want, but...
It is difficult to explain everything if you have little experience running macros, just as if you try to explain me to do something in PQ, ….
I try again.
I modified slightly my last file.
So now it is uploaded here, called FilTit3c.xlsm
Try to do this:
_1) download FilTit3c.xlsm
( download it anywhere. Forget the csv file for now. I already put it in for this attempt, just to see if you can get the fucking VBA thing to work )
( For now I put table already in : https://i.postimg.cc/vg5Z4Vvc/Table-...eady-there.jpg )
_2) open FilTit3c.xlsm ( I tried to explain here https://www.excelfox.com/forum/showt...ll=1#post23223 how to make macros enabled )
_3) go to first worksheet, Filters
https://i.postimg.cc/CZ3KMNk3/First-...et-filters.jpg
_4) type us in cell E2, https://i.postimg.cc/6813gw35/Type-us-in-cell-E2.jpg
(and press Enter)
If it works you will first see my Hairy Goolies in worksheet ResultsAlan. But you will only see my Hairy Goolies for 2 seconds.
https://i.postimg.cc/wtyvdPy5/My-Hai...-2-seconds.jpg
Then you will see more simplified results like what you want
https://i.postimg.cc/2qVqSyJZ/Simplified-results.jpg
If that does not work, then we should probably best first forget everything, and start with a new file and try to get any simple macro working for you.
Otherwise it is like you are trying to fly to the moon before you have learnt to walk….
It's too complicated, too much green color in your code - I understand nothing!
I have decided not to use vba ever again
thanks for trying , thanks for your time
Sure no problem. :)
That is a bit like me with PQ I suppose. I would like to understand it, but I doubt I will ever get the time.
Also I think with VBA it makes a very big difference if your native language is English or not. It is very wordy , but only in English. Half the code speaks for itself. It’s very visual in a basic sort of way….
I expect that if VBA was in other languages and not just English, then the main VBA forums would not have half the traffic they do. Anyone whose native language is English should be able to pick up VBA quite quickly
As for the ' green comments, there is a couple of things you can do to get rid of them.
Hide comments,
_ For one thing, there is loads of room to the right, so you can………………… ----->
It looks like there are about 1023 characters https://www.excelfox.com/forum/showt...ll=1#post10948 So you have plenty of space to put lots of stuff inCode:
----> ……………………………………………………………………………………………………………………………………….. put comments way way out to the right so you don’t have to see them all the time. It’s great for hiding links to good references and hiding links to good porno sites
Remove comments
_ The other thing you can do to get rid of them is a search and replace with wild cards,
Before: https://i.postimg.cc/pmGS0TR0/comments-before.jpg
Highlight the code you want to clean up and find the Search thing
, https://i.postimg.cc/ygxs2pbF/search.jpg , or https://i.postimg.cc/tZcpbdK8/search.jpg , or use keys Ctrl+F ( when in VB Editor )
You need to da a search with wild card with these two characters, ( no space in between) '*
https://i.postimg.cc/s17tVs4X/search-with-wild-card.jpg
Then you leave the replace bar empty and do a replace all
https://i.postimg.cc/RWV8Qf56/Replace-all.jpg
'* <------ Find <--- Replace ( leave empty )
Then they are gone.
https://i.postimg.cc/PvWcKQ5Z/Gone.jpg
( Only very rarely that can give a problem because sometimes a ' is used in coding. So you might accidently lose a bit of coding. But that does not happen often. I don’t think I have any ' inside the coding I did for you. )
I would be surprised if removing comments makes a coding easier to understand. Many people just don't like having them there, often people who already know VBA and/ or the particular coding very well. But they are easy to get rid of if you don't like to see them. Just personal preference, but they are easier to get rid of
VBA cannot currently read your mind and write a code for you. But probably ChatGPT & co. will come close to doing all that, or one way or another it will get rid of most of us. Newer versions of Windows, Office, and most Microsoft will all become just something like Chat GPT and artificial intelligence. We have no long term future, other than to become self sufficient with earlier versions and have nothing to do with Microsoft and any of their software from the last 10 - 15 years
Currently you would also need yourself to download a file and open it and use it, unless you can get someone else to do that for you. I can't do that over the internet, I figured you could / would do that at least. But hey, why be dull and conventional! Do / don't do wot you want, seriously – there is too many people in forums acting like teachers in a nursery school from the 1950’s. They’re too weak or stupid to cope with real hard life I expect.
You should never say never to anything, JIMO … or…well perhaps there is… maybe say never to anal sex. I would never do that, not even if I was Gay. Poking my cock into shit is the worst thing I can think of, ( apart from maybe trying to Learn PQ, that might be almost as bad. Although if I had to choose between poking my cock into shit, or learning PQ, I probably would choose learning PQ. But it would be a close thing! I speak English but I can’t make head or tail of PQ code. I don’t even know how/ where to find the code. I never got a PQ to work even on my Excel 2013 ( https://www.excelfox.com/forum/showt...ll=1#post23219
( https://www.excelfox.com/forum/showt...3214#post23214 ) ) )
You don’t have to understand all of a VBA coding to use it, - most peole using a VBA macro don't understand it.
But I agree it’s best not to use coding you don’t understand. But that is just personalö preferrance. I personally only ever started learning because I needed it for some important personal projects, and I don’t like using things that I don’t understand.
I started doing some further notes earlier today, https://www.excelfox.com/forum/showt...ll=1#post23247
You probably aren’t interested, but I will probably finish them anyway, maybe in a day or two. sometime for my own reference. There is some amazing stuff in those codes that only I know about because I discovered them. It still is a long complicated coding, but without the amazing stuff I discovered , it would be even more complicated and probably 3- 4 time longer.
I don’t know all VBA. No one can know it all, it is just too big. You could not learn it all even if you did nothing else for your whole life. I only know a very small part of it. But some of what I know I know better than anyone. I got a big cock as well. (But I don’t stick it in peoples arse). If my YouTube / VBA / forum career does not take off, I can earn lots of money as a Gigolo instead.
Here is another, forth, version, FilTit4.xlsm
Detailed explanation is here https://www.excelfox.com/forum/showt...ll=1#post23247
https://www.excelfox.com/forum/showt...ll=1#post23262
These are the main three differences, summarised.
_1) I have used the dictionary object a bit more cleverly, and so have reduced the amount of manipulation with VBA arrays. There are two reasons for this:
_ one reason is simply doing it a bit better after a few tries so far at a final coding, so in other words I just got better as I went along; but also,
_ the other reason is that in this version I omit the TemporaryWorksheet worksheet which pasted out the reduced size tables as we went along, which required an extra array to be made as I went along in order to do that extra output.
_2) All the extended output information that is useful in development and fault finding, is now Debug.Printed out to the Immediate window, and all the extra worksheets are omitted. The only seen output for the user is what was originally wanted
For example, using the example used in the last few posts of this
https://i.postimg.cc/crcxL3p0/Exampl...-few-posts.jpg
, then we will only see this
https://i.postimg.cc/4YNJ7dGt/Only-r...-Tit4-xlsm.jpg
, unless we look in the Immediate window, and then we can see the extended output:
Code:Using Filter Fname,rr,ll -----|---- -_-
Filterd out by "rr"
Pascale Murray
Harrison Irwin
Sierra Howe
Curran Herring
Blake Herring
Jarrod Mccarthy
Filtered Out 6
Left is: 94
Filterd out by "ll"
Katell Whitaker
Phillip Hunter
Brett Blackwell
Julian Castillo
Kelly Ware
Jin Mcmillan
Yasir Rollins
Yeo Allen
Hilel Marshall
Dillon Dunlap
Jin Gilliam
Petra Sellers
Chancellor Ratliff
Halla Hodges
Filtered Out 14
Left is: 80
Total rows/lines removed for filter Fname was 20
Using Filter FRegion,sh -----|---- -_-
Filterd out by "sh"
Azad Kashmir
Andhra Pradesh
Filtered Out 2
Left is: 78
Total rows/lines removed for filter FRegion was 2
Using Filter FCountry,us -----|---- -_-
Filterd out by "us"
Russian Federation
Australia
Russian Federation
Filtered Out 3
Left is: 75
Total rows/lines removed for filter FCountry was 3
_3) The table (from the text file) is held only in memory and is also not put or used in any temporary worksheets.
To test, then similar process to previously ,
_ download both files. They can be anywhere but both files should be in the same folder
_ open the excel workbook file only
_ In the first worksheet, type something in any filter, …. for example: type us in cell E3 of the first worksheet , and then hit Enter, https://i.postimg.cc/Cz0M076c/Type-us-in-cell-E3.jpg
That should result in getting the results indicated above