Extract information from Worksheet

joeserrone
joeserrone used Ask the Experts™
on
I have a worksheet containing raw data, (see attached) in this file I created a new worksheet called Upload. Here I want to basically extract for each line in the Raw Data I need to extract the Total Product Charges line and then the sum of column F+G+H  in the Raw Data and add them below the result from column E.

Take a look at like 2 of my Raw Data sheet and then how it should look in the Upload section, I am at a loss how I can obtain this, considering that the raw data can change in length.

Thanks.
Sample-Worksheet.xlsx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Bill PrewTest your restores, not your backups...
Top Expert 2016

Commented:
Is this a one time need, or will you need to repeat it every so often as new data sheets are provided?

Will the input always come from the first sheet of the specified XLS file, and do you want the output in a new second sheet, or in a separate XLS file.

~bp

Author

Commented:
Hi Bill, this would be an ongoing repeating task, and I would like it to output to the second sheet in the same file. Yes the template in the Raw Data will always be the same but the number of records might change.
Test your restores, not your backups...
Top Expert 2016
Commented:
Here is a VBS script that should do the job.  Save it as a VBS, and then run as follows:

cscript ee28698683.vbs Sample-Worksheet.xlsx

It will open the Excel file, add a new sheet and populate it with the data from the existing first sheet as you described.

~bp
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Subodh Tiwari (Neeraj)Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015
Commented:
Please find the attached workbook.
I have inserted a button on the Upload Sheet. You may click that button to run the code to get the desired output.

See if this is what you are trying to achieve.
Sample-Worksheet.xlsm

Author

Commented:
Exactly what I was looking for! I appreciate all your help on this
Bill PrewTest your restores, not your backups...
Top Expert 2016

Commented:
Welcome!

~bp

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial