Solved

macro for excel

Posted on 2013-02-01
15
277 Views
Last Modified: 2013-04-16
Hi,
on the link bellow Attaches is two excel files in rar format , names train and test, which I need macro for both of them to make filtering on the last column which is v43 (data class), so that I can export any numbers of records based on the v43 (data class),
There are 5 classes in the last column which are (Normal, DoS, Prob, R2L, U2R).
Check the attached picture of the outcome work.
http://www61.zippyshare.com/v/57880067/file.html

so
Thanks
what-i-need.png
0
Comment
Question by:reoroman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 6
15 Comments
 
LVL 29

Expert Comment

by:gowflow
ID: 38844286
Is this the remove Duplicate ?
gowflow
0
 

Author Comment

by:reoroman
ID: 38844331
no, another job now...that will be after this..it is the same as the previous work where the output was numbers, here the output is text.
0
 
LVL 29

Expert Comment

by:gowflow
ID: 38844735
ok let me see it and will revert

I see here you want to sort by AP but still you have a column AQ that is also used, need to know if we also need to add an extra column to put Y when you transfer so it does not transfer the same record twice  ?
gowflow
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:reoroman
ID: 38844804
I want to sort by AQ only. and i need you to put additional column for Y so it does not transfer the same record twice. thanks
0
 
LVL 29

Accepted Solution

by:
gowflow earned 500 total points
ID: 38845649
ok here it is
I tested it with the file Test and it worked fine so I guess it should work also with the other file.

Take the attached file and do the following:
Insert your data file Test and then do the following
insert on first row a blank row
then label A1 V1 and drag it all the way to Col AR so you get A44

the goto sheet main and select in the class you will see drop down from where you can only choose the available class choose the one you want with the number of occurence and then run the produce output

Let me know if it works for you.

If you insert the other sheet you need to change the sheet name to match the new sheet. Anyway try the macro and if all ok I will tell you how to change it.

gowflow
Sort-by-AQ-NOData.xlsm
0
 

Author Comment

by:reoroman
ID: 38845709
works fine, but please delete the renumber classes icon.

I need two macro one for train and one for test, OR you teach me how to change the macro to read any file name i need it to.
0
 

Author Comment

by:reoroman
ID: 38845712
can i do it by going to

Set WSTR = Sheets("Test")

and change it to

Set WSTR = Sheets("Train")
0
 
LVL 29

Expert Comment

by:gowflow
ID: 38846112
yes exactly. and for renumber jus delete the button renumber
to do this before activating macros u can delete the butotn
gowflow
0
 

Author Closing Comment

by:reoroman
ID: 38846248
Professional work, As usual.
 Thanks a lot.
0
 
LVL 29

Expert Comment

by:gowflow
ID: 38846614
Your welcome, my pleasure. Pls feel free to post a link here if you need anymore help.
Rgds/gowflow
0
 

Author Comment

by:reoroman
ID: 38846621
yes, sure thing
0
 
LVL 29

Expert Comment

by:gowflow
ID: 38846703
By the way I have ready your previous request on duplicate rows if and when let me know.
Also I was very surprised to notice that the file which had some 500,000 records after running the macro came down to only 10% of it 50,000 is it normal that you had so much duplication ?
gowflow
0
 

Author Comment

by:reoroman
ID: 38846709
hi, i am posting the question now.. i will be back with the link.. Thanks
0
 

Author Comment

by:reoroman
ID: 38846712
0
 

Author Comment

by:reoroman
ID: 39086135
gowflow, are you there ?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question