Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You want your formulas in SheetB to be relative references, not
absolute references. If, for instance, you have SheetB hard-coded to calculate its values for the month of January (SheetA ColumnB), SheetB!$C7 = SheetA!B2-SheetA!B3 change it to: SheetB!$C7 = OFFSET(SheetA!A2,0,Month)-OFFSET(SheetA!A3,0,Month) This new formula will allow SheetB to calculate based on whichever column/month in SheetA you want, depending on the value of "Month". (where 1 <= Month <= 12) You could then create a Validate cell (SheetB!C4) which allows you to pick a month from a drop-down list. If SheetA has headings (in SheetA! $B$1:$M$1), and your drop-down picklist lets you select one of those very headings, then all you have to do is lookup (using MATCH()) your drop-down selection within the range of your column headings and you'll get an actual index between 1 and 12. Substitute this in for Month below: (I've created the name "Headings" to refer to the range =SheetA!$B$1:$M $1, which are my column headings [Jan-Dec] ) SheetB!$C7 =OFFSET(SheetA!A2,0,MATCH(C4,Headings,0))-OFFSET(SheetA! A3,0,MATCH(C4,Headings,0)) Having done this, I can pick a new month in cell SheetB!C4 and my formula in SheetB!C7 does its calculation for the month I chose. Hope this is clear. Brian Herbert Withun |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatically show cell references of formulas | Excel Discussion (Misc queries) | |||
how do I change cell references automatically in formulas | Charts and Charting in Excel | |||
how to change column references, while filling down another column | Excel Discussion (Misc queries) | |||
How to change column letters to correct ones in many formulas automatically? | Links and Linking in Excel | |||
How to change column letters to correct ones in many formulas automatically? | Excel Worksheet Functions |