I need help here with VBA.
I want to hide the row of player on the ATP Stats worksheet that have 0's in all competition, the file example can be download in next link.
http://www.excelforum.com/2033721-post1.html
Thanks.
I need help here with VBA.
I want to hide the row of player on the ATP Stats worksheet that have 0's in all competition, the file example can be download in next link.
http://www.excelforum.com/2033721-post1.html
Thanks.
Last edited by MbahGondrong; 01-31-2009 at 10:24 AM.
I assume it's for the sheet named "ATP Stats"
Try
VBA Noob![]()
Please Login or Register to view this content.
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
heres an example of how to hide rows where a range of columns values are 0
![]()
Please Login or Register to view this content.
Last edited by .paul.; 01-28-2009 at 04:16 PM.
@VBA Noob
Yes It is for the ATP Stats worksheet.
Alright, I never use VBA so I don't know how to use the codes. Can you explain where to put the codes and in what worksheet I should put it.
Thanks.
Press Alt + F11 > insert module > paste in the code. Close VB editor > Press Alt + F8 > select HideZeros and run
VBA Noob
Thanks a lot it worked great, but the number seems to be not in order, can that be in an order (1,2,3,etc)?
Also how can I stop the module to run?
Thanks.
Not what you asked. You would need to sort the databut the number seems to be not in order, can that be in an order (1,2,3,etc)?
Don't understand the questionAlso how can I stop the module to run?
VBA Noob
I mean making the table look like before the module is run. Yes I know it's different question, and the previous problem is done but the look is not good after that, I mean after 1 it's 4 and not in order.
It is can be doned so that after the module run the number will still in order?
Maybe this is new question so do I need open new thread?
Thanks.
Don't understand. Maybe a example
VBA Noob
Alright this is the problem, I already apply your code in my original excel and run the macro. After that the data in ATP stats worksheet don't have the number in order. This can be seen in the attachment file in this post, you can compare it with the original attachment from the first post. I just want after the module is run the number in worksheet ATP Stats in order.
Also after your module is applied anytime there is a row that is hidden have a point (1) it is not showed but still hidden.
Thanks.
Last edited by MbahGondrong; 01-29-2009 at 12:10 PM.
This should help with changing data.
Code goes in sheet "ATP Stats". Right click sheet tab > select view code > paste in the below
VBA Noob![]()
Please Login or Register to view this content.
There seems to be nothing changing about the code and also there is some error about running the macro, it say about unsigned macro something.
This is the case, you can see in the ATP 2009 worksheet there is data about winner of tournament, and data from the ATP Stats is from there. Now everytime a new winner is added in a tournament in ATP 2009, his name in the ATP Stats is not seen but still hidden.
I hope that is informative enough.
Thanks.
Before opening the workbook, do Tools > Macro > Security, and set to Medium.
Then open the workbook and enable macros when prompted.
Entia non sunt multiplicanda sine necessitate
Already done that but still the same.
Did you put the code in the worksheet.
Here's my example
VBA Noob
Thank you man that's what I mean for the add of players that just won tournament, but one more thing is as you can see that the number's in the left of players name is not in order. Anyway to fix that so it become in order?
Also if I want to use the code in other worksheet is there anything I have to change or I just copy it?
Thanks.
Last edited by MbahGondrong; 01-30-2009 at 10:43 AM.
Will take a look after work but can you upload a example or the order you're after (Before and after sheet would be good)
VBA Noob
Seems to work. Code needs to go in "ThisWorkbook" Module and not the sheet module as before.
Added the other sheet names at this line
e.g![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
VBA Noob![]()
Please Login or Register to view this content.
Alright so I need to make new module in VBA and paste all the code and run it again right?
Yes. New code goes in ThisWorkbook module (see link)
http://www.contextures.com/xlvba01.html#Workbook
VBA Noob
Do I still need the previous code?
Thanks.
Last edited by MbahGondrong; 01-31-2009 at 06:14 AM.
No.
As i said
By placing in Workbook module it will work on all sheets instead of activate sheet which you asked forCode needs to go in "ThisWorkbook" Module and not the sheet module as before.
Then add the sheets names you want to run the code on as I suggested![]()
Please Login or Register to view this content.
PS. Best way to learn is to try so practice on a copy of the file first
VBA Noob
Yes, that should do it thanks again. But there is some error I see, first everytime I delete all the winner and finalist from ATP 2009 worksheet the excel goes ino a freeze in the previous code it's alright if I delete all winner and finalist it won't freeze. And when new data added to ATP Stats from Source (data after row 46), it don't get affected by the macro.
Second if the data that have been added is the last player in the list (Victor Hanescu) a number will appear outside the table in the ATP Stats worksheet. Can you look into that if you don't mind?
Also this is kinda stupid question, in the ATP Stats for a column that have 0 point is not visible right but when I copy it to other sheet the 0 appear and I forgot how I can make 0's not visible, can you help me into his also?
Thanks.
Last edited by MbahGondrong; 01-31-2009 at 08:35 AM.
Sorry not going to go off course any more did more than your first post as for now
This help is free and we give it not to do you're project but for a specfic problem you have. At this rate I will be wasting so much time on this and not helping others
VBA Noob
No problem anyway thanks for all the help you give me, I think I'll just try to understand your code now. Do you have any good VBA E-book for newbie that you recommend? I don't understand a thing about your code there.
Thanks.
Recording you're actions is a good way to learn and reading posts on the forum.
I would suggest Walkenbach's books.
If you want someone to finish the project and willing to pay you can post in the Commercial Services Exchange .
VBA Noob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks