Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

I need help in writing/modifying an EXCEL macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dkv0942 - 17 Oct 2007 17:16 GMT
I'm running EXCEL 2002.
I need help in writing/modifying an EXCEL macro. If anyone can point me to a
resource for sample code or examples to help with the following I would
appreciate it.

Every month I download a report from a state agency that I need to reformat,
create charts from and send reminder emails based on some of the data. The
report is downloaded as an EXCEL workbook containing a single worksheet. The
worksheet is preformatted as a printed report. I have no control of this
formatting and I can not get the data as a .csv file. The report contains 3
sections. See detailed report description below.

What I want to do:
1.    Is copy the 3rd section of the report to a new worksheet.
2.    Sort the new worksheet by name, and date.
3.    Filter some names based on resource type.
4.    Create a new file, which will be attached to an email to my boss for
follow-up.

Originally I used the built-in EXCEL macro recording function and this
worked for a couple of months. Then the number of rows in the 2nd section
varied and my generated worksheet failed to sort correctly, and I lost the
column headings so my filter no longer worked. The results were not something
I could forward. I do not know how to modify the macro to search for the
literals which end section 2 or start section 3 so I can copy the correct
data to the new worksheet. I am not a VBA programmer, just an old-fart trying
to do some administrative volunteer support for an important program, and
really do not want to become one.

Detail Report Description:
Section 1: Headings –contain fixed headings in merged & centered cells.
    Row 1 – Report heading 1 in merged cells A1–I1
    Row 2 – Report heading 2 in merged cells A2-I2
    Row 3 – Report heading 3 in merged cells A3–I3
    Row 4 – Blank row
    Row 5 – Organization information in cell A5 and merged cells B5–E5. Run by
            information in F5 and merged cells G5-H5.
    Row 6 – Resource information in cell A6 and merged cells B6–D6.
    Row 7 – Start of reporting period information in cell A7 and merged cells
B7–D7.
    Row 8 – End of reporting period information in cell A8 and merged cells
B8–D8.
    Row 9 – Blank row.
Section 2: People who have submitted timesheets during the reporting period.
    Row 10 - Blank row.
    Row 11 – Section Headings in merged cells A11-B11, C11-E11, F11-G11, single
    cell     H11, & merged cells I11-J11
    Row 12 – Start of data for this section. The data fields map to the column
heading above.
    The number of rows in this section varies from 1 to over 300.
    Last row of section contains literal “Resource Totals:” merged into cells
A?-B?.
Section 3: People who are missing timesheets for the reporting period.
    The section starts with a blank row.
    Next row contains section heading, starting with the literal “Resources
Missing Period     Timesheets” merged into cells A?-C?.
    Next row contains column headings for the section; starting with the
literal “Contact Name”     merged into cells A?-C?.
    Next row = Start of data for this section. The data fields map to the
column heading above.
    The number of rows in this section varies from 1 to the end of data. There
is not a     terminating literal.
etradeguru@hotmail.com - 18 Oct 2007 12:19 GMT
dkv0942,
I am not sure how old you are to qualify as an old fart, but take
comfort from the fact that I will shortly be a whole half century
young and I only really got hooked on VBA about a year ago because
circumstances dictated the need.
Its just a matter of confidence.
There will be others more well versed than I who will undoubtedly
reply to your call for help, but in the meantime, take courage in both
hands and go have a look at some of the mvp sites. A good start is
Chip Pearson at www.cpearson.com/excel/mainpage.aspx

Good luck
dkv0942 - 21 Oct 2007 16:59 GMT
> dkv0942,
> I am not sure how old you are to qualify as an old fart, but take
[quoted text clipped - 8 lines]
>
> Good luck
dkv0942 - 21 Oct 2007 17:12 GMT
> dkv0942,
> I am not sure how old you are to qualify as an old fart, but take
[quoted text clipped - 10 lines]
>
> Thanks for the kind words of encouragement. Glad to here you are approaching the 1/2 century mark. It will be just a couple of years when I can attend my 50th HS reunion. The first couple of technical replies as summed a knowledge & skill level with Colo's HTML Maker utility which didn't exist. So it has been an interesting and very challenging 3 days. Now that I have gotten a screen-shot uploaded, I can take your advice and visit the MVP sites again. I enjoy my volunteer work, but would much prefer to run my reports & statistics out of an ACCESS database, but tha is no possible with this organization. Again thanks for the encouragement.
Pete_UK - 18 Oct 2007 12:48 GMT
It would help if you post your recorded macro here - then we can see
how it needs to be modified.

Pete

> I'm running EXCEL 2002.
> I need help in writing/modifying an EXCEL macro. If anyone can point me to a
[quoted text clipped - 58 lines]
>         The number of rows in this section varies from 1 to the end of data. There
> is not a        terminating literal.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.