Solved

Macro help

Posted on 2011-03-02
8
218 Views
Last Modified: 2012-06-27
hi i  need help with macro .. i been tryin to extract few values from the data ... but cant seem to get it .. i am attaching a example file and it has what i need the macro to do .. in this case i have done manually, but in future .. there will be alot more data so it will be little difficult to do it manually.

Thanks
Shanghai-TM6-test.xls
0
Comment
Question by:zoomer003
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 12

Assisted Solution

by:sdwalker
sdwalker earned 200 total points
ID: 35018572
I think the code embedded in this version will do exactly what you want.

Good luck,

sdwalker
Copy-of-Shanghai-TM6-test-sdw.xls
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 35018612
at this point, I see no correlation between column A data and the box to right, or even if you want to do something with it.  you'll need to explain your goal and what exactly you've done manually.
0
 

Author Comment

by:zoomer003
ID: 35018885
hey sd walker .. you got the concept right but there might be a slight error in the code! cuz the result i got from your macro is bit different from what i got manually .. i would highly appreciate if you could fix it out! THANK YOU SO MUCH!
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 1

Accepted Solution

by:
jeff77tor earned 300 total points
ID: 35019310
Hey Zoomer...

I think your manual work might have missed a few items... That or you will need to be more specific about what you are looking for.

The attached macro works according to the following rules:
- Creates a new sheet for the summary data
- Looks for the following items and adds their data values to the appropriate column:
"cno_mean", "sync_agc_gain", "GPS_SIRF_STP Total",  "GPS_SIRF_STP Sets of data", "New max", "New min"

You can easily change the parsing keys yourself by modifying the first line of the ParseData macro.
'Change the keys if you want to look for something different.
    parseKeys = Array("cno_mean", "sync_agc_gain", "GPS_SIRF_STP Total", _
    "GPS_SIRF_STP Sets of data", "New max", "New min")

Open in new window


Let me know if you need for help.
Shanghai-TM6-test.xls
0
 
LVL 12

Expert Comment

by:sdwalker
ID: 35019560
I'm coming back from lunch right now. I'll check it out in a few minutes.
0
 
LVL 12

Expert Comment

by:sdwalker
ID: 35019837
The only differences I see are:
   - you have an AGC of 1 for time 15:02:57.938, which is incorrect
   - you have a New Min for time 15:04:30.984, which isn't in the data
   - you have several timestamps that are incorrect.

I think my version is exactly right, given the inputs.
0
 

Author Comment

by:zoomer003
ID: 35020881
Hey guys i jus need little more help... i actually want more data to be parsed .. i am sorry for makin you guys work extra .. sorry .. any help will be highly appreciated!

"svid", "period", "cno_mean", "cno_sigma", "clock drift", "clock offset", "phase lock", "rtc_frequency", "e_to_acq_ratio", "sync_agc_gain", "GPS_SIRF_STP Total", _
    "GPS_SIRF_STP Sets of data", "New max", "New min"
Shanghai-TM6-test.xls
0
 
LVL 1

Expert Comment

by:jeff77tor
ID: 35028732
Ok... Slight change of the code...

Now you can change the keys AND headers at will...

The parse keys are the text items searched for in the data. The parse keys need to be an exact match to the data. The colTitles are is the header text in the summary table. The colTitles need to be in the same order, but can have any text you want inside the quotes.

Enjoy.

    'Change the keys if you want to look for something different.
    parseKeys = Array("svid", "period", "cno_mean", "cno_sigma", "clock drift", "clock offset", "phase lock", "rtc_frequency", "e_to_acq_ratio", "sync_agc_gain", "GPS_SIRF_STP Total", "GPS_SIRF_STP Sets of data", "New max", "New min")
    
    ' List of column headers
    Dim colTitles As Variant
    colTitles = Array("Time", "svid", "period", "cno_mean", "cno_sigma", "clock drift", "clock offset", "phase lock", "rtc_frequency", "e_to_acq_ratio", "sync_agc_gain", "GPS_SIRF_STP Total", "GPS_SIRF_STP Sets of data", "New max", "New min")

Open in new window

Shanghai-TM6-test.xls
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now