Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combine CountA and CountIf

How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number for
the second formula?

So, if the first formula produced 5 the second one would be right.


RBS

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default combine CountA and CountIf

=COUNTA(INDIRECT("A"&COUNTIF($2:$2,"3Morb_3*")&":E "&COUNTIF($2:$2,"3Morb_3*"
)))

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number for
the second formula?

So, if the first formula produced 5 the second one would be right.


RBS



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combine CountA and CountIf

Thanks for that. I knew it would be possible.

RBS

"Bob Phillips" wrote in message
...
=COUNTA(INDIRECT("A"&COUNTIF($2:$2,"3Morb_3*")&":E "&COUNTIF($2:$2,"3Morb_3*"
)))

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number for
the second formula?

So, if the first formula produced 5 the second one would be right.


RBS




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combine CountA and CountIf

Actually, it is not quite what I am after as in this formula there still is
the hard-coded column E.
The column E should be produced by the COUNTIF.
It looks close though.

RBS

"Bob Phillips" wrote in message
...
=COUNTA(INDIRECT("A"&COUNTIF($2:$2,"3Morb_3*")&":E "&COUNTIF($2:$2,"3Morb_3*"
)))

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number for
the second formula?

So, if the first formula produced 5 the second one would be right.


RBS




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default combine CountA and CountIf

=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number for
the second formula?

So, if the first formula produced 5 the second one would be right.


RBS





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combine CountA and CountIf

Thanks, that works.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number for
the second formula?

So, if the first formula produced 5 the second one would be right.


RBS




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combine CountA and CountIf

There still is a problem and that is caused by circular references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<
4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have tried with
and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number for
the second formula?

So, if the first formula produced 5 the second one would be right.


RBS




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default combine CountA and CountIf

the formula you show boils down to something like

say COUNTIF($3:$3,"3Test_3*") results in a value of 10 then
offset(I4,0,0,1,10) becomes I4:R4
Assume CountA(I4:R4) returns 5

then you formula becomes

=if(5<4,"NA",offset(H4,0,5)-offset(h4,0,5-3))

or if(5<4,"NA",M4-J4)

is that correct

What cell contains the formula?

--
Regards,
Tom Ogilvy








"RB Smissaert" wrote in message
...
There still is a problem and that is caused by circular references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<
4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have tried
with and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number
for the second formula?

So, if the first formula produced 5 the second one would be right.


RBS






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combine CountA and CountIf

In the example it was cells H4.
Not figured this out yet.

What I am trying to do is this:
In a sheet is data with repeating columns in groups of 3 like this:
Term, Date, Value, Term, Date, Value etc.
The only way to see how far to the right this goes is by looking at fields,
which are in row 2.
This is the 3Test_3 bit.
If in one row there are more than one of the Term, Date, Value groups I need
to take the last Value
(the one most to the right) and take of the Value in the group to the left
of that.
So for example if I have:
44P.., 05/10/2005, 10, 44P.., 05/10/2006, 8
The result would be 2 (10 - 8)
More complex than I thought, but I will figure it out.

RBS

"RB Smissaert" wrote in message
...
There still is a problem and that is caused by circular references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<
4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have tried
with and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number
for the second formula?

So, if the first formula produced 5 the second one would be right.


RBS





  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combine CountA and CountIf

This gives me the right answer when the formula is in H5, but for some
reason when I copy down I get #Value
errors or NA.

=IF(COUNTA(I5:OFFSET(I5,0,COUNTIF($2:$2,"3Test_3*" )))<
6,"NA",OFFSET(H5,0,COUNTA(I5:OFFSET(I5,0,COUNTIF($ 2:$2,"3Test_3*")))) -
OFFSET(H5,0,COUNTA(I5:OFFSET(I5,0,COUNTIF($3:$3,"3 Test_3*")))-3))

RBS

"Tom Ogilvy" wrote in message
...
the formula you show boils down to something like

say COUNTIF($3:$3,"3Test_3*") results in a value of 10 then
offset(I4,0,0,1,10) becomes I4:R4
Assume CountA(I4:R4) returns 5

then you formula becomes

=if(5<4,"NA",offset(H4,0,5)-offset(h4,0,5-3))

or if(5<4,"NA",M4-J4)

is that correct

What cell contains the formula?

--
Regards,
Tom Ogilvy








"RB Smissaert" wrote in message
...
There still is a problem and that is caused by circular references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<
4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have tried
with and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number
for the second formula?

So, if the first formula produced 5 the second one would be right.


RBS








  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default combine CountA and CountIf

Bart,

I may be simplifying this too much, but couldn't you get the last item in a
row with

=INDEX(8:8,,COUNTA($7:$7))

where row 7 is the headings, Term, date Value

the previous would then be

=INDEX(8:8,,COUNTA($7:$7)-3)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
In the example it was cells H4.
Not figured this out yet.

What I am trying to do is this:
In a sheet is data with repeating columns in groups of 3 like this:
Term, Date, Value, Term, Date, Value etc.
The only way to see how far to the right this goes is by looking at

fields,
which are in row 2.
This is the 3Test_3 bit.
If in one row there are more than one of the Term, Date, Value groups I

need
to take the last Value
(the one most to the right) and take of the Value in the group to the left
of that.
So for example if I have:
44P.., 05/10/2005, 10, 44P.., 05/10/2006, 8
The result would be 2 (10 - 8)
More complex than I thought, but I will figure it out.

RBS

"RB Smissaert" wrote in message
...
There still is a problem and that is caused by circular references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<
4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have tried
with and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number
for the second formula?

So, if the first formula produced 5 the second one would be right.


RBS






  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default combine CountA and CountIf

That simplifies it a bit too much as there can be other data that I am
not interested in
more to the right.
This one works, with the formula's in column H:

=IF(COUNTA(I3:OFFSET(I3,0,COUNTIF($2:$2,"44P*")))<
6,"NA",OFFSET(H3,0,COUNTA(I3:OFFSET(I3,0,COUNTIF($ 2:$2,"44P*")))) -
OFFSET(H3,0,COUNTA(I3:OFFSET(I3,0,COUNTIF($2:$2,"4 4P*")))-3))

Although I get quite a few #VALUE errors that I don't understand yet.
It is not caused by the data it is looking at as that is fine.

RBS


Bob Phillips wrote:
Bart,

I may be simplifying this too much, but couldn't you get the last item in a
row with

=INDEX(8:8,,COUNTA($7:$7))

where row 7 is the headings, Term, date Value

the previous would then be

=INDEX(8:8,,COUNTA($7:$7)-3)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
In the example it was cells H4.
Not figured this out yet.

What I am trying to do is this:
In a sheet is data with repeating columns in groups of 3 like this:
Term, Date, Value, Term, Date, Value etc.
The only way to see how far to the right this goes is by looking at

fields,
which are in row 2.
This is the 3Test_3 bit.
If in one row there are more than one of the Term, Date, Value groups I

need
to take the last Value
(the one most to the right) and take of the Value in the group to the left
of that.
So for example if I have:
44P.., 05/10/2005, 10, 44P.., 05/10/2006, 8
The result would be 2 (10 - 8)
More complex than I thought, but I will figure it out.

RBS

"RB Smissaert" wrote in message
...
There still is a problem and that is caused by circular references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<
4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have tried
with and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number
for the second formula?

So, if the first formula produced 5 the second one would be right.


RBS





  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default combine CountA and CountIf

The #VALUE error happens if there is data to look at more than 21
columns the right.
No idea why this would be a problem.

RBS


wrote:
That simplifies it a bit too much as there can be other data that I am
not interested in
more to the right.
This one works, with the formula's in column H:

=IF(COUNTA(I3:OFFSET(I3,0,COUNTIF($2:$2,"44P*")))<
6,"NA",OFFSET(H3,0,COUNTA(I3:OFFSET(I3,0,COUNTIF($ 2:$2,"44P*")))) -
OFFSET(H3,0,COUNTA(I3:OFFSET(I3,0,COUNTIF($2:$2,"4 4P*")))-3))

Although I get quite a few #VALUE errors that I don't understand yet.
It is not caused by the data it is looking at as that is fine.

RBS


Bob Phillips wrote:
Bart,

I may be simplifying this too much, but couldn't you get the last item in a
row with

=INDEX(8:8,,COUNTA($7:$7))

where row 7 is the headings, Term, date Value

the previous would then be

=INDEX(8:8,,COUNTA($7:$7)-3)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
In the example it was cells H4.
Not figured this out yet.

What I am trying to do is this:
In a sheet is data with repeating columns in groups of 3 like this:
Term, Date, Value, Term, Date, Value etc.
The only way to see how far to the right this goes is by looking at

fields,
which are in row 2.
This is the 3Test_3 bit.
If in one row there are more than one of the Term, Date, Value groups I

need
to take the last Value
(the one most to the right) and take of the Value in the group to the left
of that.
So for example if I have:
44P.., 05/10/2005, 10, 44P.., 05/10/2006, 8
The result would be 2 (10 - 8)
More complex than I thought, but I will figure it out.

RBS

"RB Smissaert" wrote in message
...
There still is a problem and that is caused by circular references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<
4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have tried
with and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column number
for the second formula?

So, if the first formula produced 5 the second one would be right.


RBS





  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default combine CountA and CountIf

I must admit to being confused by what you are trying to do, but this bit

OFFSET(I3,0,COUNTIF($2:$2,"44P*")

shouldn't you multiply the COUNTIF by 3 and subtract 1 since they are 3
column offsets, otherwise you only get some of the data not all.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
The #VALUE error happens if there is data to look at more than 21
columns the right.
No idea why this would be a problem.

RBS


wrote:
That simplifies it a bit too much as there can be other data that I am
not interested in
more to the right.
This one works, with the formula's in column H:

=IF(COUNTA(I3:OFFSET(I3,0,COUNTIF($2:$2,"44P*")))<
6,"NA",OFFSET(H3,0,COUNTA(I3:OFFSET(I3,0,COUNTIF($ 2:$2,"44P*")))) -
OFFSET(H3,0,COUNTA(I3:OFFSET(I3,0,COUNTIF($2:$2,"4 4P*")))-3))

Although I get quite a few #VALUE errors that I don't understand yet.
It is not caused by the data it is looking at as that is fine.

RBS


Bob Phillips wrote:
Bart,

I may be simplifying this too much, but couldn't you get the last item

in a
row with

=INDEX(8:8,,COUNTA($7:$7))

where row 7 is the headings, Term, date Value

the previous would then be

=INDEX(8:8,,COUNTA($7:$7)-3)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
In the example it was cells H4.
Not figured this out yet.

What I am trying to do is this:
In a sheet is data with repeating columns in groups of 3 like this:
Term, Date, Value, Term, Date, Value etc.
The only way to see how far to the right this goes is by looking at
fields,
which are in row 2.
This is the 3Test_3 bit.
If in one row there are more than one of the Term, Date, Value

groups I
need
to take the last Value
(the one most to the right) and take of the Value in the group to

the left
of that.
So for example if I have:
44P.., 05/10/2005, 10, 44P.., 05/10/2006, 8
The result would be 2 (10 - 8)
More complex than I thought, but I will figure it out.

RBS

"RB Smissaert" wrote in message
...
There still is a problem and that is caused by circular

references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<

4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have

tried
with and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column

number
for the second formula?

So, if the first formula produced 5 the second one would be

right.


RBS







  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combine CountA and CountIf

Yes, you are absolutely right, it needs to be multiplied by 3 and then minus
1.

So, with the fields in row one and the formula in column H this is the right
formula:

=IF(COUNTA(I2:OFFSET(I2,0,COUNTIF($1:$1,"44P*")*3-1))<
6,"NA",OFFSET(H2,0,COUNTA(I2:OFFSET(I2,0,COUNTIF($ 1:$1,"44P*")*3-1))) -
OFFSET(H2,0,COUNTA(I2:OFFSET(I2,0,COUNTIF($1:$1,"4 4P*")*3-1))-3))

It works now on my home PC and that might be it.
Thanks for spotting this bug.

RBS

"Bob Phillips" wrote in message
...
I must admit to being confused by what you are trying to do, but this bit

OFFSET(I3,0,COUNTIF($2:$2,"44P*")

shouldn't you multiply the COUNTIF by 3 and subtract 1 since they are 3
column offsets, otherwise you only get some of the data not all.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
The #VALUE error happens if there is data to look at more than 21
columns the right.
No idea why this would be a problem.

RBS


wrote:
That simplifies it a bit too much as there can be other data that I am
not interested in
more to the right.
This one works, with the formula's in column H:

=IF(COUNTA(I3:OFFSET(I3,0,COUNTIF($2:$2,"44P*")))<
6,"NA",OFFSET(H3,0,COUNTA(I3:OFFSET(I3,0,COUNTIF($ 2:$2,"44P*")))) -
OFFSET(H3,0,COUNTA(I3:OFFSET(I3,0,COUNTIF($2:$2,"4 4P*")))-3))

Although I get quite a few #VALUE errors that I don't understand yet.
It is not caused by the data it is looking at as that is fine.

RBS


Bob Phillips wrote:
Bart,

I may be simplifying this too much, but couldn't you get the last
item

in a
row with

=INDEX(8:8,,COUNTA($7:$7))

where row 7 is the headings, Term, date Value

the previous would then be

=INDEX(8:8,,COUNTA($7:$7)-3)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
In the example it was cells H4.
Not figured this out yet.

What I am trying to do is this:
In a sheet is data with repeating columns in groups of 3 like this:
Term, Date, Value, Term, Date, Value etc.
The only way to see how far to the right this goes is by looking at
fields,
which are in row 2.
This is the 3Test_3 bit.
If in one row there are more than one of the Term, Date, Value

groups I
need
to take the last Value
(the one most to the right) and take of the Value in the group to

the left
of that.
So for example if I have:
44P.., 05/10/2005, 10, 44P.., 05/10/2006, 8
The result would be 2 (10 - 8)
More complex than I thought, but I will figure it out.

RBS

"RB Smissaert" wrote in message
...
There still is a problem and that is caused by circular

references.
My formula will have to look like this:

=IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3* ")))<

4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF( $3:$3,"3Test_3*")))) -
OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3," 3Test_3*")))-3))

Not sure what construction I need to avoid an error message. Have

tried
with and If(IsError( construction, but
that still has the same problem.

RBS


"Tom Ogilvy" wrote in message
...
=CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))


--
Regards,
Tom Ogilvy


"RB Smissaert" wrote in message
...
How in a worksheet formula would I combine these 2:

=COUNTIF($2:$2,"3Morb_3*")
and
=COUNTA(A7:E7)

where the result of the first formula would provide the column

number
for the second formula?

So, if the first formula produced 5 the second one would be

right.


RBS








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
COUNTA or COUNTIF or COUNT Liz Excel Worksheet Functions 4 June 4th 10 11:41 PM
COUNTA or COUNTIF?? Jayme Excel Discussion (Misc queries) 7 September 4th 09 12:52 AM
If with countif or counta [email protected] Excel Worksheet Functions 3 September 28th 08 07:24 PM
CountIF, CountA,Which one? or neither? amy Excel Discussion (Misc queries) 2 July 20th 05 07:09 PM
COUNTA, COUNTIF? Newbie Excel Worksheet Functions 1 March 18th 05 11:33 AM


All times are GMT +1. The time now is 01:54 AM.

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

About Us

"It's about Microsoft Excel"