Set value of cell to calculation

  • Thread starter Thread starter WembleyBear
  • Start date Start date
W

WembleyBear

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
 
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.
 
Back
Top