Something New

H

Harlan Grove

Excel 2003 SP2.

I've been revising a workbook and came across an Excel quirk that's
new to me. I haven't read about anything similar in the newsgroups.

The workbook in question usually has all worksheets protected and the
workbook protected, but I've unprotected the workbook and all
worksheets and unhidden all but one worksheet. Some of the worksheets
have embedded spaces in their names. There are no worksheet events,
but there are workbook Open, Activate, Deactivate and BeforeClose
events. There's also one udf, named HasFormula, that takes a Range
object as its argument and returns TRUE/FALSE if the first cell in
that range has a formula. I only use this udf in conditional
formatting formulas.

I'm editing formulas in one of the worksheets that's usually hidden.
Call it Sheet C. The formulas were something like

='Sheet B'!X99

and I want to change them to

=IF('Sheet B'!X99<>"",'Sheet B'!X99,'Sheet A'!C123)

I edit the formula in a cell in Sheet C, inserting the 'IF(' at the
beginning, copying the original cell reference in the formula bar,
appending '<>"",', pasting the cell reference, and appending a comma.
Then I press [F2] to change to Enter mode, repeatedly press [Ctrl]+
[PgUp] to move to 'Sheet A', move to cell C123 in that worksheet (now
in Point mode), type a right parenthesis and then press [Enter].

Here's the quirk: Excel tries to enter the edited formula into 'Sheet
A'!C123 rather than into the cell in Sheet C that I began editing.
Fortunately, 'Sheet A'!C123 has a validation rule that rejects the
formula. I should also mention that Sheet A has separate frozen panes,
and C123 is in the lower, unfrozen pane.

Has anyone else had Excel do this? I can work around it, so I'm not
looking for an immediate fix, but this is definitely annoying. If
there's an easy fix, I'd be grateful for any pointers.
 
R

Ron Coderre

Harlan,

I got different, but also completely unexpected results!

Workbook Structure...Sheets in this order:
Sheet4
Sheet C
Sheet B
Sheet A

'Sheet B'!A1 contains the CF that engages a pattern if
'Sheet B'!B1 contains a formula (using the UDF).
'Sheet B'!A1 is otherwise empty.

'Sheet C'!A1: ='Sheet B'!X99

I edited 'Sheet C'!A1 per your instructions 3 times
.....with 3 different results.

Iteration_1:
Upon pressing enter....
'Sheet B'!B1 gets this formula: =IF('Sheet B'!X99<>"",'Sheet B'!X99,#Ref!)
and returns a circular error.

Iteration_2:
Upon pressing enter....PC pauses as if frozen
I press enter again....Excel crashes.

Iteration_3 (on the post-crash, "repaired" workbook):
Upon pressing enter....
'Sheet B'!A1 (which was empty and had the CF):
now has =IF('Sheet B'!X99<>"",'Sheet B'!X99,'Sheet A'!C123)
(the CF is still valid.)

In all 3 instances, the edited cell
'Sheet C'!A1 retained it's original formula: ='Sheet B'!X99

I am completely stumped by
1) the failure to achieve the intended result
and
2) the 3-tries, 3-different erroneous results.

Consequently, I have no solution or explanation to offer.

Appropos, Harlan
A challenge worthy of your Excel expertise.
......"a bon chat, un bon rat!"

--------------------------

Best Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


Harlan Grove said:
Excel 2003 SP2.

I've been revising a workbook and came across an Excel quirk that's
new to me. I haven't read about anything similar in the newsgroups.

The workbook in question usually has all worksheets protected and the
workbook protected, but I've unprotected the workbook and all
worksheets and unhidden all but one worksheet. Some of the worksheets
have embedded spaces in their names. There are no worksheet events,
but there are workbook Open, Activate, Deactivate and BeforeClose
events. There's also one udf, named HasFormula, that takes a Range
object as its argument and returns TRUE/FALSE if the first cell in
that range has a formula. I only use this udf in conditional
formatting formulas.

I'm editing formulas in one of the worksheets that's usually hidden.
Call it Sheet C. The formulas were something like

='Sheet B'!X99

and I want to change them to

=IF('Sheet B'!X99<>"",'Sheet B'!X99,'Sheet A'!C123)

I edit the formula in a cell in Sheet C, inserting the 'IF(' at the
beginning, copying the original cell reference in the formula bar,
appending '<>"",', pasting the cell reference, and appending a comma.
Then I press [F2] to change to Enter mode, repeatedly press [Ctrl]+
[PgUp] to move to 'Sheet A', move to cell C123 in that worksheet (now
in Point mode), type a right parenthesis and then press [Enter].

Here's the quirk: Excel tries to enter the edited formula into 'Sheet
A'!C123 rather than into the cell in Sheet C that I began editing.
Fortunately, 'Sheet A'!C123 has a validation rule that rejects the
formula. I should also mention that Sheet A has separate frozen panes,
and C123 is in the lower, unfrozen pane.

Has anyone else had Excel do this? I can work around it, so I'm not
looking for an immediate fix, but this is definitely annoying. If
there's an easy fix, I'd be grateful for any pointers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top