Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Script Needed. R u brilliant enough to come up with a script for this..???/

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,50326
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Script Needed. R u brilliant enough to come up with a script for this..???/
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Script Needed. R u brilliant enough to come up with a s... - 8/2/2007 9:34:10 PM   
  aru1683

 

Posts: 25
Score: 0
Joined: 7/1/2007
From: India
Status: offline
Hi All,
can any one come up with a script for the following steps.

1. there s a test.txt file which has some data.
2.Import the data to excel.

      after importing the excel would look like

      Date              Time        LogNo      P.Date     Price        Trans      ShopID
     080702          ****       2315        080702    123          2021        AA120

    It would typically contain 15000 records.

3.The records would be in 1st sheet.
4.Sort the columns in the order of Date , Shopid , Log no.
5.After sorting, Check the date . and current date and yesterday date should be kept as it. and rest of the date and its row should be deleted.
6.now the sheet would have the records of current date and last date.
7.move the last date records to sheet no 2 in the same work book.
8.Now the file wil have the following,
  sheet 1 --> Records of current date
sheet  2 --> Records of last date.

9. Go to sheet 1, if some no of records belongs to particular shopid is greater than 10 then those records should be kept in the sheet.
   and the rest of the records should be deleted.

10.Now the sheet 1 would have as many records for a shop id.
    then the rest of the column should be deleted except shop id.


Can some body come up with a script for the above 10 steps...if u come up , i would be very happy and it would be helpful so..
 
 
Post #: 1
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/2/2007 9:37:24 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
We're not here to write scripts for you.

Besides, you'd be better off writing that in VBA.  Hell, you could even record a macro once so that it generates the code for you

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to aru1683)
 
 
Post #: 2
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/6/2007 6:32:20 PM   
  aru1683

 

Posts: 25
Score: 0
Joined: 7/1/2007
From: India
Status: offline
since am new to this scripting area , i am struggling a bit..
could some one help me out..
Thanks in Advance

(in reply to ginolard)
 
 
Post #: 3
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/6/2007 6:43:39 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
What do you have so far?

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to aru1683)
 
 
Post #: 4
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/7/2007 8:01:07 AM   
  mangusridhar

 

Posts: 5
Score: 0
Joined: 8/7/2007
Status: offline
instead of using vbscript, its better to use macro in excel itself for this....

(in reply to aru1683)
 
 
Post #: 5
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/8/2007 6:23:56 AM   
  mcds99


Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
open excel
find the file, when it wants to know the name set it to ALL files
click on the file, click open
It is a delimited file in some way figure out which way is best to open the file.

_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to aru1683)
 
 
Post #: 6
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/8/2007 2:11:57 PM   
  dm_4ever


Posts: 2723
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
I know this is , but is it me or is there an increase in people simply saying "give me the code I need/want"????????

Heck, who will give me millions of dollars just because I ask/want it????

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to aru1683)
 
 
Post #: 7
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/8/2007 4:38:32 PM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
i especially like this part of the topic:

R u brilliant enough to come up with a script for this..???/

yeah, like thats gonna make we want to write the script for this guy...

perhaps they should check out www.rentacoder.com

_____________________________

Have you searched here ?
VBScript Fundamentals
My Site

(in reply to dm_4ever)
 
 
Post #: 8
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/10/2007 1:45:43 AM   
  mcds99


Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
I've been seeing the increase as well, when a Forum is as good as this one is the news gets arround. Then they come in droves.

You may notice it comes from places where english is a second or third language so reading the prime directive may get missed.

quote:

ORIGINAL: dm_4ever

I know this is , but is it me or is there an increase in people simply saying "give me the code I need/want"????????

Heck, who will give me millions of dollars just because I ask/want it????


_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to dm_4ever)
 
 
Post #: 9
 
 RE: Script Needed. R u brilliant enough to come up with... - 8/10/2007 6:16:55 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
Not only that, but the vbscript commands are the same regardless of the programmers mother tongue. So if I were trying to use babelfish to get info from a non-english site I might be tempted to just ask for the code since I figure that I can figure out what it is doing easier than figure out what the poster is saying.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mcds99)
 
 
Post #: 10
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Script Needed. R u brilliant enough to come up with a script for this..???/ Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts