Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Lookup first value in row of cells

Hi
I have a row of data (A2:X2) which contain some blank and some non-blank
cells, I want to put the first (left to right) value in a new cell on same
row Z. The value of cells are numerical to indicate a month (1 for Jan, 12
for Dec etc). Any help would be greatly appreciated.

Thanks

David
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Lookup first value in row of cells

=MIN(IF(A2:X2<"",COLUMN(A2:X2)))
This is an array formula so commit it with CTRL+****F+ENTER not just ENTER
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some non-blank
cells, I want to put the first (left to right) value in a new cell on same
row Z. The value of cells are numerical to indicate a month (1 for Jan, 12
for Dec etc). Any help would be greatly appreciated.

Thanks

David



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Lookup first value in row of cells

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some non-blank
cells, I want to put the first (left to right) value in a new cell on same
row Z. The value of cells are numerical to indicate a month (1 for Jan, 12
for Dec etc). Any help would be greatly appreciated.

Thanks

David



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Lookup first value in row of cells

Hi Benard
Thanks, however the first value may be not be the smallest of the values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some non-blank
cells, I want to put the first (left to right) value in a new cell on same
row Z. The value of cells are numerical to indicate a month (1 for Jan, 12
for Dec etc). Any help would be greatly appreciated.

Thanks

David




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Lookup first value in row of cells

The formula does not look for the smallest value but the smallest (ie the
first) column number with a value in it, then INDEX gets the value from that
column
Give it a try and let me know what you think, or send me private email and I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell on
same
row Z. The value of cells are numerical to indicate a month (1 for Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Lookup first value in row of cells

Hi Bernard
It works great but only if there is no data or columns to the left of the row.
My sheet has some columns to the left of the data I want to refer to and it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie the
first) column number with a value in it, then INDEX gets the value from that
column
Give it a try and let me know what you think, or send me private email and I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell on
same
row Z. The value of cells are numerical to indicate a month (1 for Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Lookup first value in row of cells

Since you are now starting in column E, we need to subtract 4 from the
column number
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) ))-4)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of the
row.
My sheet has some columns to the left of the data I want to refer to and
it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie the
first) column number with a value in it, then INDEX gets the value from
that
column
Give it a try and let me know what you think, or send me private email
and I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the
values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell
on
same
row Z. The value of cells are numerical to indicate a month (1 for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Lookup first value in row of cells

Some non-array formulas:

Will display the first text *or* numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(E16:X16<0,),))

Will display the first numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(ISNUMBER(E16:X16), ),))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of the
row.
My sheet has some columns to the left of the data I want to refer to and it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie the
first) column number with a value in it, then INDEX gets the value from
that
column
Give it a try and let me know what you think, or send me private email and
I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell on
same
row Z. The value of cells are numerical to indicate a month (1 for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David







  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Lookup first value in row of cells

Much better than mine - need more coffee!
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"RagDyeR" wrote in message
...
Some non-array formulas:

Will display the first text *or* numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(E16:X16<0,),))

Will display the first numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(ISNUMBER(E16:X16), ),))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of the
row.
My sheet has some columns to the left of the data I want to refer to and
it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie the
first) column number with a value in it, then INDEX gets the value from
that
column
Give it a try and let me know what you think, or send me private email
and
I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the
values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell
on
same
row Z. The value of cells are numerical to indicate a month (1 for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David








  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Lookup first value in row of cells

Great thanks RagDyeR and Bernard.
one last thing if there is no data in the row I need a blank cell or a zero

David

"RagDyeR" wrote:

Some non-array formulas:

Will display the first text *or* numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(E16:X16<0,),))

Will display the first numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(ISNUMBER(E16:X16), ),))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of the
row.
My sheet has some columns to the left of the data I want to refer to and it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie the
first) column number with a value in it, then INDEX gets the value from
that
column
Give it a try and let me know what you think, or send me private email and
I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell on
same
row Z. The value of cells are numerical to indicate a month (1 for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David










  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Lookup first value in row of cells

Try this:

=IF(COUNTA(E16:X16)=0,INDEX(E16:X16,MATCH(TRUE,IND EX(E16:X16<0,),)),"")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"daveprospects180" wrote in
message ...
Great thanks RagDyeR and Bernard.
one last thing if there is no data in the row I need a blank cell or a
zero

David

"RagDyeR" wrote:

Some non-array formulas:

Will display the first text *or* numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(E16:X16<0,),))

Will display the first numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(ISNUMBER(E16:X16), ),))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of the
row.
My sheet has some columns to the left of the data I want to refer to and
it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie
the
first) column number with a value in it, then INDEX gets the value from
that
column
Give it a try and let me know what you think, or send me private email
and
I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the
values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180"
wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell
on
same
row Z. The value of cells are numerical to indicate a month (1 for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David










  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Lookup first value in row of cells

TYPO !

Try this instead:

=IF(COUNTA(E16:X16)<0,INDEX(E16:X16,MATCH(TRUE,IN DEX(E16:X16<0,),)),"")
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"RagDyer" wrote in message
...
Try this:

=IF(COUNTA(E16:X16)=0,INDEX(E16:X16,MATCH(TRUE,IND EX(E16:X16<0,),)),"")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"daveprospects180" wrote in
message ...
Great thanks RagDyeR and Bernard.
one last thing if there is no data in the row I need a blank cell or a
zero

David

"RagDyeR" wrote:

Some non-array formulas:

Will display the first text *or* numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(E16:X16<0,),))

Will display the first numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(ISNUMBER(E16:X16), ),))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of
the
row.
My sheet has some columns to the left of the data I want to refer to and
it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie
the
first) column number with a value in it, then INDEX gets the value
from
that
column
Give it a try and let me know what you think, or send me private email
and
I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the
values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180"
wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new
cell on
same
row Z. The value of cells are numerical to indicate a month (1
for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David












  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Lookup first value in row of cells

Your input much appreciated though, thanks
David

"Bernard Liengme" wrote:

Much better than mine - need more coffee!
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"RagDyeR" wrote in message
...
Some non-array formulas:

Will display the first text *or* numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(E16:X16<0,),))

Will display the first numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(ISNUMBER(E16:X16), ),))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of the
row.
My sheet has some columns to the left of the data I want to refer to and
it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie the
first) column number with a value in it, then INDEX gets the value from
that
column
Give it a try and let me know what you think, or send me private email
and
I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the
values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell
on
same
row Z. The value of cells are numerical to indicate a month (1 for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David









  #14   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Lookup first value in row of cells

Don't worry about last comment, have now got solution.
Many thanks for your input RagDyeR, yours wins the day.

David

"daveprospects180" wrote:

Great thanks RagDyeR and Bernard.
one last thing if there is no data in the row I need a blank cell or a zero

David

"RagDyeR" wrote:

Some non-array formulas:

Will display the first text *or* numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(E16:X16<0,),))

Will display the first numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(ISNUMBER(E16:X16), ),))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of the
row.
My sheet has some columns to the left of the data I want to refer to and it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie the
first) column number with a value in it, then INDEX gets the value from
that
column
Give it a try and let me know what you think, or send me private email and
I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new cell on
same
row Z. The value of cells are numerical to indicate a month (1 for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David








  #15   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Lookup first value in row of cells

You're welcome, and appreciate the feed-back.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"daveprospects180" wrote in
message ...
Don't worry about last comment, have now got solution.
Many thanks for your input RagDyeR, yours wins the day.

David

"daveprospects180" wrote:

Great thanks RagDyeR and Bernard.
one last thing if there is no data in the row I need a blank cell or a
zero

David

"RagDyeR" wrote:

Some non-array formulas:

Will display the first text *or* numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(E16:X16<0,),))

Will display the first numeric value in the range:

=INDEX(E16:X16,MATCH(TRUE,INDEX(ISNUMBER(E16:X16), ),))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"daveprospects180" wrote in
message ...
Hi Bernard
It works great but only if there is no data or columns to the left of
the
row.
My sheet has some columns to the left of the data I want to refer to and
it
does not work if it is there.
I am using
=INDEX(E16:X16,,MIN(IF(E16:X16<"",COLUMN(E16:X16) )))
Columns A-D have text, text, number, text in their cells

David

"Bernard Liengme" wrote:

The formula does not look for the smallest value but the smallest (ie
the
first) column number with a value in it, then INDEX gets the value
from
that
column
Give it a try and let me know what you think, or send me private email
and
I
will send you a sample file
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180" wrote
in
message ...
Hi Benard
Thanks, however the first value may be not be the smallest of the
values
A2:X2.
eg values could be 9,10,12, 2 in row or 2, 6, 7 need the 9 and 2 to
appear
in Z2

Thanks
David

"Bernard Liengme" wrote:

Ops, I had not finished !

=INDEX(A2:X2,,MIN(IF(A2:X2<"",COLUMN(A2:X2))))
this is also an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"daveprospects180"
wrote
in
message ...
Hi
I have a row of data (A2:X2) which contain some blank and some
non-blank
cells, I want to put the first (left to right) value in a new
cell on
same
row Z. The value of cells are numerical to indicate a month (1
for
Jan,
12
for Dec etc). Any help would be greatly appreciated.

Thanks

David










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
Returning data of multiple cells for lookup of mulltiple cells HELP on data reference formulas Excel Discussion (Misc queries) 1 October 29th 08 08:27 PM
Lookup and Name cells lenni Excel Worksheet Functions 2 October 16th 07 02:11 PM
lookup value between cells cursednomore Excel Worksheet Functions 5 February 26th 07 11:38 PM
lookup a value and return cells Dwarf Excel Worksheet Functions 3 February 26th 06 02:31 AM
Lookup without empty cells. comotoman Excel Discussion (Misc queries) 3 October 4th 05 04:16 PM


All times are GMT +1. The time now is 12:38 PM.

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"