View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
puiuluipui puiuluipui is offline
external usenet poster
 
Posts: 468
Default If cell not empty, then display from range

Hi, this is what i was looking for. But there is a little problem.
Your code display a date from range, but if the last cell, or the next cell
in range A1:L1 is empty, i receive an error. Can this code display a message
when find an empty cell in range A1:L1?
Thanks!

"Teethless mama" wrote:

Ignore the previous post. Use this one

=IF(COUNT(A2:L2),INDEX(A1:L1,MATCH(10^10,A2:L2)+1) ,A1)


"puiuluipui" wrote:

Hi, i have dates in range A1:L1.
In range A2:L2 i will have numbers.
If A2:L2 is empty, then the code to display content of A1.
If A2 has some numbers, then the code to display content of B1.
If B2 has some numbers, then the code to display content of C1.
If C2 has some numbers, then the code to display content of D1.
.......and so on...
Can this be done?
Thanks!