ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   conditional formatting odd/even rows (https://www.excelbanter.com/excel-programming/318225-conditional-formatting-odd-even-rows.html)

Tim[_39_]

conditional formatting odd/even rows
 
Hi All,

I know there are solutions to colouring odd & even rows, but could someone
tell me why what i'm trying is not working (and if there is a way of making
it work)...

in conditional formatting for some cells in a column, i used conditional
formatting as follows: -

[Formula is] "=iseven(rows())"... and if that condition is true, change the
cell colour

ie, if the row for that cell is even, the 'iseven' result is true and
therefore it should carry out the conditional formatting. what actually
happens is an error, telling me i can't refer to other worksheets/books, btu
i didn't think i was doing that anyway!!

i'm missing something obvious here, but i've tried several variations on
this theme but still can't do it.

thanks fo any guidance,

Tim



Frank Kabel

conditional formatting odd/even rows
 
Hi
first: use ROW() and not ROWS(). Try the following (as it does not
require the Analysis toolpak addin):
=MOD(ROW(),2)=0

--
Regards
Frank Kabel
Frankfurt, Germany

"Tim" schrieb im
Newsbeitrag ...
Hi All,

I know there are solutions to colouring odd & even rows, but could

someone
tell me why what i'm trying is not working (and if there is a way of

making
it work)...

in conditional formatting for some cells in a column, i used

conditional
formatting as follows: -

[Formula is] "=iseven(rows())"... and if that condition is true,

change the
cell colour

ie, if the row for that cell is even, the 'iseven' result is true and
therefore it should carry out the conditional formatting. what

actually
happens is an error, telling me i can't refer to other

worksheets/books, btu
i didn't think i was doing that anyway!!

i'm missing something obvious here, but i've tried several variations

on
this theme but still can't do it.

thanks fo any guidance,

Tim




Tim[_39_]

conditional formatting odd/even rows
 
Frank

thanks - a quick and simple solution (i feel a bit stupid for not working
that one out)

cheers

tim


"Frank Kabel" wrote in message
...
Hi
first: use ROW() and not ROWS(). Try the following (as it does not
require the Analysis toolpak addin):
=MOD(ROW(),2)=0

--
Regards
Frank Kabel
Frankfurt, Germany

"Tim" schrieb im
Newsbeitrag ...
Hi All,

I know there are solutions to colouring odd & even rows, but could

someone
tell me why what i'm trying is not working (and if there is a way of

making
it work)...

in conditional formatting for some cells in a column, i used

conditional
formatting as follows: -

[Formula is] "=iseven(rows())"... and if that condition is true,

change the
cell colour

ie, if the row for that cell is even, the 'iseven' result is true and
therefore it should carry out the conditional formatting. what

actually
happens is an error, telling me i can't refer to other

worksheets/books, btu
i didn't think i was doing that anyway!!

i'm missing something obvious here, but i've tried several variations

on
this theme but still can't do it.

thanks fo any guidance,

Tim






david mcritchie

conditional formatting odd/even rows
 
Hi Tim,
it is ROW() not rows()
=ISEVEN(ROW())
=ISODD(ROW())

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Tim" wrote in message ...
Hi All,

I know there are solutions to colouring odd & even rows, but could someone
tell me why what i'm trying is not working (and if there is a way of making
it work)...

in conditional formatting for some cells in a column, i used conditional
formatting as follows: -

[Formula is] "=iseven(rows())"... and if that condition is true, change the
cell colour

ie, if the row for that cell is even, the 'iseven' result is true and
therefore it should carry out the conditional formatting. what actually
happens is an error, telling me i can't refer to other worksheets/books, btu
i didn't think i was doing that anyway!!

i'm missing something obvious here, but i've tried several variations on
this theme but still can't do it.

thanks fo any guidance,

Tim





david mcritchie

conditional formatting odd/even rows
 
sorry about that didn't look first, was already answered and better by Frank



Tim[_39_]

conditional formatting odd/even rows
 
Rows() was a typo on my part - sorry, i knew it should've been row(), but it
still didn't work

thanks anyway though - Franks reply worked like a dream!


"David McRitchie" wrote in message
...
sorry about that didn't look first, was already answered and better by

Frank






All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com