Macro help

Posted on 2011-03-02
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.

Question by:zoomer003
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
  • 3
  • 2
  • 2
  • +1
LVL 12

Assisted Solution

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

Good luck,

LVL 22

Expert Comment

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.

Author Comment

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!
Industry Leaders: 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!


Accepted Solution

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.
LVL 12

Expert Comment

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

Expert Comment

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.

Author Comment

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"

Expert Comment

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.


    '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


Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

734 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