Hi,
Solution given by Sam is better than using loop.
Regards,
Swapnil.
On Wed, Oct 5, 2011 at 11:24 PM, Sam Mathai Chacko wrote:
> You could do it without a loop. As indicated by Hariharan, selecting all
> sheets and then adding the code will do the trick. For a VBA, paste this to
> the code
You could do it without a loop. As indicated by Hariharan, selecting all
sheets and then adding the code will do the trick. For a VBA, paste this to
the code module of the first sheet.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.HasFormula Then
Target.Select
Select all the sheets first and then write a formula wherever you need
in Excel.
The formula will be coming in all the sheets.
Thanks,
Hariharan Tharagan
-Original Message-
From: excel-macros@googlegroups.com
[mailto:excel-macros@googlegroups.com] On Behalf Of renuka chari
Sent: Tuesday,
Hi,
Try following code
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sht As Worksheet
Dim shtname As String
If Target.HasFormula Then
For Each sht In ThisWorkbook.Sheets
If sht.Name <> ActiveSheet.Name And sht.Cells(Target.Row,
Ta