Solved

Macro help

Posted on 2011-03-02
8
215 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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

747 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

10 Experts available now in Live!

Get 1:1 Help Now