ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Set value of cell to calculation (https://www.excelbanter.com/excel-programming/425244-set-value-cell-calculation.html)

WembleyBear

Set value of cell to calculation
 
I have two spreadsheets €“ one is called Branch A and one is called Company.
Branch A contains financial information, but only for the current month.
Company is a summary which has columns for each of the months, January,
February etc. At the top of this spreadsheet is a drop-down box with the
current month in it called CURRMONTH.

What I need is to be able to make a calculation from Branch A and have it
place the result in the relevant column on the Company spreadsheet. The
calculation is:

=[Branch A.xls]Main!A102-[Branch A.xls]Main!A103

but it needs to go in the correct column based on what month is selected in
the CURRMONTH drop-down. How do I do this?

Thanks for your help

Martyn

--
Excel 2000, Windows 2003 over Citrix PS4

Nigel[_2_]

Set value of cell to calculation
 
If the dates are in order then the LINK cell for the control (if Form
control) will return the control list number, if an activeX control then use
the ListIndex property that will return the selected control entry -1, you
can use this directly to offset your target cell.

If dates are not in order then use a VLOOKUP to take the value from the
control, lookup this value in a control table and get the cell reference
into which you wish to place the value.



--

Regards,
Nigel




"WembleyBear" wrote in message
...
I have two spreadsheets €“ one is called Branch A and one is called Company.
Branch A contains financial information, but only for the current month.
Company is a summary which has columns for each of the months, January,
February etc. At the top of this spreadsheet is a drop-down box with the
current month in it called CURRMONTH.

What I need is to be able to make a calculation from Branch A and have it
place the result in the relevant column on the Company spreadsheet. The
calculation is:

=[Branch A.xls]Main!A102-[Branch A.xls]Main!A103

but it needs to go in the correct column based on what month is selected
in
the CURRMONTH drop-down. How do I do this?

Thanks for your help

Martyn

--
Excel 2000, Windows 2003 over Citrix PS4




All times are GMT +1. The time now is 02:05 PM.

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