ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Creating a Macro the right way? (https://www.excelbanter.com/excel-worksheet-functions/254371-creating-macro-right-way.html)

Hvns

Creating a Macro the right way?
 
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

Don Guillett[_2_]

Creating a Macro the right way?
 
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.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Hvns" wrote in message
...
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



JLatham

Creating a Macro the right way?
 
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.


"Hvns" wrote:

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



All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com