Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default want to copy formula, only change one number in formula

I am using a main worksheet in a workbook to capture information from other
worksheets within the workbook. I want to copy formulas without changing all
the formula. I only want to change 1 value when copying. Example:

='PO#6601'!F7

The only number I want to change when copying this formula is the "6601" I
want it to increase by one each time the formula is copied. I want
everything else to stay the same especially the "F7". This program is a
purchase order program with a ledger which saves all the information with
each new purchase order I record on a separtate worksheet.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default want to copy formula, only change one number in formula

One way ..

Place this in the starting cell, eg in B2:
=INDIRECT("'PO#"&ROW(A1)+6600&"'!F7")
Copy down as far as required

If you are copying it across, use instead in B2:
=INDIRECT("'PO#"&COLUMN(A1)+6600&"'!F7")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"cac1966" wrote:
I am using a main worksheet in a workbook to capture information from other
worksheets within the workbook. I want to copy formulas without changing all
the formula. I only want to change 1 value when copying. Example:

='PO#6601'!F7

The only number I want to change when copying this formula is the "6601" I
want it to increase by one each time the formula is copied. I want
everything else to stay the same especially the "F7". This program is a
purchase order program with a ledger which saves all the information with
each new purchase order I record on a separtate worksheet.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default want to copy formula, only change one number in formula

Thanks max, it didnt work a #ref1 was returned. I tried to manipulate the
formula but I kept getting the same error. Here is an example of what I am
trying to do:

PO# Date Description...
6600 *
6601 *
....

in the date column I want it to fill in the dates from the Purchase orders
automatically. I referenced the PO#'s originally in the formula and it would
extract the dates, descriptions, etc.. The original formular I used was
='PO#6600'!f7 and it worked fine. In order for it to do this with all the
Purchase Orders I had to change the "6600" in the formula to 6601, 6602, etc.
and the "f7" referenced the date from each PO. When I copied the formula it
would change the F7 and not the PO#. Basically I want the opposite. The F7
to stay the same and the PO# to change by increments of 1. If you could
provide more help I would greatly appreciate it.

Rick

"Max" wrote:

One way ..

Place this in the starting cell, eg in B2:
=INDIRECT("'PO#"&ROW(A1)+6600&"'!F7")
Copy down as far as required

If you are copying it across, use instead in B2:
=INDIRECT("'PO#"&COLUMN(A1)+6600&"'!F7")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"cac1966" wrote:
I am using a main worksheet in a workbook to capture information from other
worksheets within the workbook. I want to copy formulas without changing all
the formula. I only want to change 1 value when copying. Example:

='PO#6601'!F7

The only number I want to change when copying this formula is the "6601" I
want it to increase by one each time the formula is copied. I want
everything else to stay the same especially the "F7". This program is a
purchase order program with a ledger which saves all the information with
each new purchase order I record on a separtate worksheet.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default want to copy formula, only change one number in formula

.. The original formula I used was ='PO#6600'!f7 and it worked fine.
.. Basically I want the opposite. The F7 to stay the same
and the PO# to change by increments of 1.


Yes, think I got your intent correctly earlier. The suggested formulas
should have worked*. They work ok here when I tested them prior to posting
the response.
*except for a minor adjustment in the number "6600" (I had a mistake there,
it should have been "6599")

Assuming the formulas are to be copied down
Try it again, adjusted like this, in B2:
=INDIRECT("'PO#"&ROW(A1)+6599&"'!F7")
Copy B2 down

(To avoid typos in reproducing the formula over there,
try a direct copy of the above formula from this post,
then paste it into the formula bar for B2)

In B2, the above would return the same as your link formula:
='PO#6600'!F7

And when B2 is copied down to B3, the formula will increment** to return the
same as the link formula: ='PO#6601'!F7, and so on, giving you exactly what
you want.
**the incrementing is via this part in the formula: ROW(A1)+6599

Note: If you're copying across instead of down, use in B2:
=INDIRECT("'PO#"&COLUMN(A1)+6599&"'!F7")

If you get #REF errors, this probably means that there's some inconsistency
between the actual sheetnames and the sheetnames stringed together within the
INDIRECT. Both must match exactly (except for case). Recheck the actual
sheetnames that you have. Watch out for any trailing whitespaces in the
actual sheetnames. These are hard to see and will throw the matching off.

Of course, any new sheetnames that don't exist as yet will return #REF

Try it again, let me know here how it went for you.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"cac1966" wrote:
Thanks max, it didnt work a #ref1 was returned. I tried to manipulate the
formula but I kept getting the same error. Here is an example of what I am
trying to do:

PO# Date Description...
6600 *
6601 *
...

in the date column I want it to fill in the dates from the Purchase orders
automatically. I referenced the PO#'s originally in the formula and it would
extract the dates, descriptions, etc.. The original formular I used was
='PO#6600'!f7 and it worked fine. In order for it to do this with all the
Purchase Orders I had to change the "6600" in the formula to 6601, 6602, etc.
and the "f7" referenced the date from each PO. When I copied the formula it
would change the F7 and not the PO#. Basically I want the opposite. The F7
to stay the same and the PO# to change by increments of 1. If you could
provide more help I would greatly appreciate it.

Rick


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy a formula that does not change the column or row number? s2m via OfficeKB.com Excel Discussion (Misc queries) 5 June 19th 06 05:14 PM
copy a formula into multiple worksheets and change 1 row down each Will Excel Discussion (Misc queries) 0 February 9th 06 08:27 PM
Copy a formula down a set number of times Julian Excel Worksheet Functions 1 September 23rd 05 06:43 PM
how to copy just the number that a formula creates Paula Excel Worksheet Functions 1 July 22nd 05 09:44 PM
how do i copy formula and change worksheet instead of cell dal0506 Excel Worksheet Functions 2 January 21st 05 08:41 PM


All times are GMT +1. The time now is 11:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"