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!
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.


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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

728 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