PDA

View Full Version : maro to work on one sheet as opposed to all sheets in the workbook



gilligans
06-01-2006, 04:54 PM
Hi,

I am new to excel and have to debug and fix this problem written by someone who left the company.
Well this excel workbook has lots of sheets and also sheets which have relevant data that gets used in the formula.

Now, say for eg lets considered the sheet called 'A'.

it does the calculations on the headcount needed for call center.
so the columns refer to a formula called gets() which then calls the erlanc function.

Now the problem here is this gets() function takes a value called calc


and this calc just a cell in one of the sheets called table. Now if I change the headcount value in the sheet 'A' nothing happens. Then I need to change the value of calc cell say make it to 5 or 6 in sheet 'table' and hit enter. It starts calulating the values to forecast the headcount, but it does so for all the sheets . so it is taking a lot of time.

So I have two problems here :
1>Can someone tell me how to get make it calculate only for one sheet.
2>what ever changes i do to say sheet 'A' and hit F9 or save it should calculate for that sheet instead of going to sheet 'table' and changing the calc value to trigger the recalculation.

PLease please help

help appreciated
g

malik641
06-01-2006, 08:40 PM
uh.......I'm having a difficult time understanding what you need, but here's my suggestion...

Place this in the Sheet's module that you want to calculate ONLY in that ONE sheet:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
ActiveSheet.Calculate
End Sub

Is this what you meant?