Creating a Macro

K

Keith Ader

I know how to create a macro, but I have a question. I get a report every month that I download to a excell file. It has equipment broken down by department. I then create tables, get rid of the extra colums, group the items under the department so I can choose what I want to see, etc. I could create a macro to do this every month, but the problem is that the amount of information changes. One month I could have 100 pieces of equipment that come up under a given department, and the next month 2. Is there a wat to set up a macro so that it can compensate for this?
 
A

Auric__

Keith said:
I know how to create a macro, but I have a question. I get a report
every month that I download to a excell file. It has equipment broken
down by department. I then create tables, get rid of the extra colums,
group the items under the department so I can choose what I want to see,
etc. I could create a macro to do this every month, but the problem is
that the amount of information changes. One month I could have 100
pieces of equipment that come up under a given department, and the next
month 2. Is there a wat to set up a macro so that it can compensate for
this?

Sure, but the actual doing will depend largely on the data you receive: What
format do you receive the data in? Are the columns the same every month? Are
there column headers in the source data? Etc.
 
G

Gord Dibben

Short answer.............yes, you can do what you need.

As you have found out when recording, Excel will generally record
fixed range references.

You could try recording using the Relative mode which will show you
how to use the Offset method but even that is not optimal.

There are methods for working on variable ranges only but would need
much more detail than you have given.



Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top