Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Luc Benninger
 
Posts: n/a
Default Static cell reference

Hi,
I should create a formula with kind of a static cell reference within.
That means, if cells are deleted or inserted above or to the left of the
referenced cell, the reference should still point to the same cell as
before and not be automatically adjusted. Is this possible??
Thanks, Luc
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=INDIRECT("A1")

--
HTH

Bob Phillips

"Luc Benninger" wrote in message
...
Hi,
I should create a formula with kind of a static cell reference within.
That means, if cells are deleted or inserted above or to the left of the
referenced cell, the reference should still point to the same cell as
before and not be automatically adjusted. Is this possible??
Thanks, Luc



  #3   Report Post  
Luc Benninger
 
Posts: n/a
Default

Thanks for replying Bob. I wasn't able to use the INDIRECT function in
my formula. Maybe you are?
I need this two conditional format formulas to format a selected range:
=MOD(ROW(A7001)-1;7)<3
=MOD(ROW(A7001)-1;7)=3
These formulas mark the first three rows in a colour, the next four in
an other colour, then again three rows in the first colour and so on and on.
If a user deletes the referenced row the conditional format won't work
anymore (lost ref). Therefore I use row 7001, hoping that nobody (or
hardly anybody) will ever delete it.
But there is still a problem. If above the referenced row a row is
deleted or inserted, the conditional formulas change automatically
(i.e. to =MOD(ROW(A7002)-1;7)<3). Now the colour pattern on the selected
range shifts vertically by one position. Therefore I would like to have
the "A7001"-reference to be static.

Thanks again, Luc


Bob Phillips wrote:
=INDIRECT("A1")

  #4   Report Post  
Jack Sheet
 
Posts: n/a
Default

Don't know if this helps, but

In cell B10 if you enter =OFFSET(B10,-2,3)
Then it will always refer to the cell 2 up and 3 to the right, regardless of
whether you insert or delete rows or columns between the referenced cell and
the referencing cell.


"Luc Benninger" wrote in message
...
Hi,
I should create a formula with kind of a static cell reference within.
That means, if cells are deleted or inserted above or to the left of the
referenced cell, the reference should still point to the same cell as
before and not be automatically adjusted. Is this possible??
Thanks, Luc



  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

Luc,

Why not just use

=MOD(ROW()-1;7)<3
=MOD(ROW()-1;7)=3


--
HTH

Bob Phillips

"Luc Benninger" wrote in message
...
Thanks for replying Bob. I wasn't able to use the INDIRECT function in
my formula. Maybe you are?
I need this two conditional format formulas to format a selected range:
=MOD(ROW(A7001)-1;7)<3
=MOD(ROW(A7001)-1;7)=3
These formulas mark the first three rows in a colour, the next four in
an other colour, then again three rows in the first colour and so on and

on.
If a user deletes the referenced row the conditional format won't work
anymore (lost ref). Therefore I use row 7001, hoping that nobody (or
hardly anybody) will ever delete it.
But there is still a problem. If above the referenced row a row is
deleted or inserted, the conditional formulas change automatically
(i.e. to =MOD(ROW(A7002)-1;7)<3). Now the colour pattern on the selected
range shifts vertically by one position. Therefore I would like to have
the "A7001"-reference to be static.

Thanks again, Luc


Bob Phillips wrote:
=INDIRECT("A1")





  #6   Report Post  
LanceB
 
Posts: n/a
Default

How about
=MOD(ROW()-1,7)<3

"Luc Benninger" wrote:

Thanks for replying Bob. I wasn't able to use the INDIRECT function in
my formula. Maybe you are?
I need this two conditional format formulas to format a selected range:
=MOD(ROW(A7001)-1;7)<3
=MOD(ROW(A7001)-1;7)=3
These formulas mark the first three rows in a colour, the next four in
an other colour, then again three rows in the first colour and so on and on.
If a user deletes the referenced row the conditional format won't work
anymore (lost ref). Therefore I use row 7001, hoping that nobody (or
hardly anybody) will ever delete it.
But there is still a problem. If above the referenced row a row is
deleted or inserted, the conditional formulas change automatically
(i.e. to =MOD(ROW(A7002)-1;7)<3). Now the colour pattern on the selected
range shifts vertically by one position. Therefore I would like to have
the "A7001"-reference to be static.

Thanks again, Luc


Bob Phillips wrote:
=INDIRECT("A1")


  #7   Report Post  
Luc Benninger
 
Posts: n/a
Default

This would not assure that the first three lines of the range selection
are in color1 and the next four in color2. The pattern would depend on
the first row number in the selection.

LanceB wrote:
How about
=MOD(ROW()-1,7)<3

"Luc Benninger" wrote:


Thanks for replying Bob. I wasn't able to use the INDIRECT function in
my formula. Maybe you are?
I need this two conditional format formulas to format a selected range:
=MOD(ROW(A7001)-1;7)<3
=MOD(ROW(A7001)-1;7)=3
These formulas mark the first three rows in a colour, the next four in
an other colour, then again three rows in the first colour and so on and on.
If a user deletes the referenced row the conditional format won't work
anymore (lost ref). Therefore I use row 7001, hoping that nobody (or
hardly anybody) will ever delete it.
But there is still a problem. If above the referenced row a row is
deleted or inserted, the conditional formulas change automatically
(i.e. to =MOD(ROW(A7002)-1;7)<3). Now the colour pattern on the selected
range shifts vertically by one position. Therefore I would like to have
the "A7001"-reference to be static.

Thanks again, Luc


Bob Phillips wrote:

=INDIRECT("A1")


  #8   Report Post  
Bob Phillips
 
Posts: n/a
Default

Then how about =MOD(ROW(A1)-1,7)<3

--
HTH

Bob Phillips

"Luc Benninger" wrote in message
...
This would not assure that the first three lines of the range selection
are in color1 and the next four in color2. The pattern would depend on
the first row number in the selection.

LanceB wrote:
How about
=MOD(ROW()-1,7)<3

"Luc Benninger" wrote:


Thanks for replying Bob. I wasn't able to use the INDIRECT function in
my formula. Maybe you are?
I need this two conditional format formulas to format a selected range:
=MOD(ROW(A7001)-1;7)<3
=MOD(ROW(A7001)-1;7)=3
These formulas mark the first three rows in a colour, the next four in
an other colour, then again three rows in the first colour and so on and

on.
If a user deletes the referenced row the conditional format won't work
anymore (lost ref). Therefore I use row 7001, hoping that nobody (or
hardly anybody) will ever delete it.
But there is still a problem. If above the referenced row a row is
deleted or inserted, the conditional formulas change automatically
(i.e. to =MOD(ROW(A7002)-1;7)<3). Now the colour pattern on the selected
range shifts vertically by one position. Therefore I would like to have
the "A7001"-reference to be static.

Thanks again, Luc


Bob Phillips wrote:

=INDIRECT("A1")




  #9   Report Post  
Luc Benninger
 
Posts: n/a
Default

Then I run into trouble if someone deletes the first row. the
conditional format formula will have a ref error and no formatting at
all will be applied.

Bob Phillips wrote:
Then how about =MOD(ROW(A1)-1,7)<3

  #10   Report Post  
Bob Phillips
 
Posts: n/a
Default

That doesn't happen for me. Which row has the error?

--
HTH

Bob Phillips

"Luc Benninger" wrote in message
...
Then I run into trouble if someone deletes the first row. the
conditional format formula will have a ref error and no formatting at
all will be applied.

Bob Phillips wrote:
Then how about =MOD(ROW(A1)-1,7)<3





  #11   Report Post  
Bob Phillips
 
Posts: n/a
Default

I get it now.

Final shot <vbg

=MOD(ROW(1:1)-1,7)<3


--
HTH

Bob Phillips

"Luc Benninger" wrote in message
...
Then I run into trouble if someone deletes the first row. the
conditional format formula will have a ref error and no formatting at
all will be applied.

Bob Phillips wrote:
Then how about =MOD(ROW(A1)-1,7)<3



  #12   Report Post  
Jack Sheet
 
Posts: n/a
Default

Why not simply have the conditional format refer to the same cell (or a cell
in the same row) as the cell containing the conditional format? Provided
that you exclude "$" symbols ie ensure that the cells within the conditional
format are all expressed as relative, then the conditional format function
should still work if you copy the cell (or just copy special the formats)
down. Then any row that is deleted should not give rise to any error
message, and the row colouring should be preserved.

Thus, in cell A1, use =MOD(ROW(A1)-1,7)<3
but in cell A2, use =MOD(ROW(A2)-1,7)<3
etc

--
Return email address is not as DEEP as it appears
"Luc Benninger" wrote in message
...
Then I run into trouble if someone deletes the first row. the conditional
format formula will have a ref error and no formatting at all will be
applied.

Bob Phillips wrote:
Then how about =MOD(ROW(A1)-1,7)<3



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM
Formula with text and reference to a date cell [email protected] Excel Discussion (Misc queries) 1 January 11th 05 08:15 AM
international absulute cell reference Sadinga Excel Discussion (Misc queries) 5 December 22nd 04 10:08 PM
Using the results from two seperate cells to create cell reference DarrenWood Excel Worksheet Functions 2 November 14th 04 10:35 PM


All times are GMT +1. The time now is 10:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"