Creating a Macro the right way?

H

Hvns

Hello,

I am wanting to know where to start and if this is possible.

1.) I have a multi-tabbed work book which consists of product numbers and
pricing.

Is it possible to have a macro update all tabs with the pricing information
that was updated say on the last tab (main update tab)?


Thanks in advance... Hvns
 
D

Don Guillett

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.
 
J

JLatham

It is most definitely possible to create a macro to do that. Relatively easy
once things are known such as the columns the product numbers and pricing are
in on both the main update tab and the individual 'other' sheets.

But it may not be necessary. A VLOOKUP() formula in the cells with the
pricing information on the other sheets could do the work for you
automatically.

Simple examples:
On the 'individual' tabs you have the product numbers in column A, with
their price in column C (so cell C3 would reflect the cost of item showin in
A3).

On your main update tab, you have list of product numbers and other
information including price. The product number is in Column B with the
price for it out in column F.

On an individual sheet, (from above example info), in C3 you could have a
formula like:
=VLOOKUP(A3,'Main Update Tab'!$B:$F,5,False)
That says: take the value in A3 on this sheet and find it in column B
(somewhere in rows 1 through 100) on the 'Main Update Tab' sheet and when you
find it, return the value in the 5th column of that table. You can actually
use that same formula to look up all of your pricing on all tabs; the only
thing that would change in them would be the A3 reference to the cell on the
individual sheet holding the product number to find the price for.

Naturally you'd change sheet name and cell/column references to match the
reality of your workbook. Big advantage here is that you know the prices are
always up to date, no need to worry about running a macro to make sure
they're up to date.
 

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