Paul Wakefield
New Member
- Joined
- Sep 11, 2002
- Messages
- 40
I have a fairly large model in which, on a particular sheet, I am trying to echo the contents from another sheet according to the row in which the active cell is situated. i.e. if the active cell is in Row 15 on sheet 1, I want to show what is in row 15 on sheet 2.
I need to do this because Sheet 1 is used for data input and the results of the input need to be seen immediately at the bottom of the input screen. Flicking from one sheet to another or using separate windows are not viable options.
I have written a small function to achieve this. This will work initially but then causes Excel to crash. Any guidance or an alternative solution would be welcome. I am using Excel 97 SR2.
To recreate the issue, create a 2 sheet file. On Sheet 1, in Cells A1 to A5, enter the numbers 1 to 5.
Create the following function:
Function rowcheck()
Application.Volatile
rowcheck = ActiveCell.row
End Function
On sheet2, in cell A1, enter =Rowcheck()-1
In cell a2, enter =offset(‘Sheet 1’!$a$1,$a$1,0)
Moving around rows 1 to 5 on sheet 2 will reflect the correct results (press F9 each time; in the real model, this is not an issue).
Now return to sheet 1 and start to enter 2 to 6 in cells b1 to b5. the sheets will group, 2 cursors will appear on the same sheet and Excel will fall over. Note: The problem occurs in my “real” model without the switch to any other sheet.
Paul
I need to do this because Sheet 1 is used for data input and the results of the input need to be seen immediately at the bottom of the input screen. Flicking from one sheet to another or using separate windows are not viable options.
I have written a small function to achieve this. This will work initially but then causes Excel to crash. Any guidance or an alternative solution would be welcome. I am using Excel 97 SR2.
To recreate the issue, create a 2 sheet file. On Sheet 1, in Cells A1 to A5, enter the numbers 1 to 5.
Create the following function:
Function rowcheck()
Application.Volatile
rowcheck = ActiveCell.row
End Function
On sheet2, in cell A1, enter =Rowcheck()-1
In cell a2, enter =offset(‘Sheet 1’!$a$1,$a$1,0)
Moving around rows 1 to 5 on sheet 2 will reflect the correct results (press F9 each time; in the real model, this is not an issue).
Now return to sheet 1 and start to enter 2 to 6 in cells b1 to b5. the sheets will group, 2 cursors will appear on the same sheet and Excel will fall over. Note: The problem occurs in my “real” model without the switch to any other sheet.
Paul