[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Macro help

Posted on 2011-03-02
Medium Priority
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 800 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!
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!


Accepted Solution

jeff77tor earned 1200 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
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 …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

650 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