×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Building simple Macro help

Building simple Macro help

Building simple Macro help

(OP)
I have never written any computer code, if someone could help me with a simple macro. Our eng. department summarizes data from one work sheet to another. What I would like to be able to do is take the test data from one sheet and summarize it to another. The test data doesn’t always come off the same way so I think it would work best if the Macro looked for a word in a row and then located the correct Colum and then collect the data. Please picture below example in an excell grid format

Barometer 29.19 29.19 29.19 29.18 29.18 29.17 29.17 29.18 AVERAGE
Apple 103.9 104. 104. 104. 104.1 103.8 103.9 103.97
Orange 74.04 73.99 73.95 73.97 74.04 74. 74.04 73.99



It needs to find "Apple" then count over however far to the Average column and pull the data and then paste it into the new summary sheet. If someone can get me started I will work on completing it.


Thanks

RE: Building simple Macro help

I don't think you need a macro. It sounds like you're describing exactly what the VLOOKUP function does in Excel. To that end, here's two ideas for getting started:

1. Paste the following into an Excel spreadsheet cell:

CODE

=VLOOKUP("Apple", A1:J3, 10) 
That will grab the value from the AVERAGE column of the Apple row, as long as the data is in A1:J3. To find out how the function works, click the fx button when editing the cell.

2. For more assistance, try the engineering spreadsheets forum (link below). Be warned though, some folk might expect that you've done a little more work on your own behalf before asking for help!

http://www.eng-tips.com/threadminder.cfm?pid=770

RE: Building simple Macro help

Perhaps an un-necessary tip, but if the number of values is not constant between spreadsheets (but the same between each row) you can add CountA to LiteYear's tip

CODE --> =VLOOKUP("Apple",A1:J3,COUNTA(A5:J5))

 

This will give you the last value in each row, no matter how many columns there are... the caveat is that the average column would need to be in the same column for all data sets.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close