If cell not empty, then display from range

P

puiuluipui

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!
 
T

Teethless mama

Ignore the previous post. Use this one

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

puiuluipui

Hi, i removed "+1" from the code because it add a day to my date (i have
01.09.2009, and the code display 02.09.2009).
The code it's working but it's not displaying next cell.
If "I2" has numbers, your code display content from "I1"
I need your code to display content of next cell (J1)
Can this be done?
Thanks!
 
P

puiuluipui

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!
 
T

Teethless mama

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

puiuluipui

Hi, it's working. I need a few more changes though. This is the last request.
I will not bother you anymore :)

J1=01.10.2009
If the date your code display is 01.10.2009 and today is 03.10.2009, this
mean this date has past. If J2 is empty, then the code to display "pay". If
J2 has numbers, then to display next date.

And i need to add one more thing:
Your code display a date. I need to display remaining days. Can you add
something like "-today()"?

Can this be done?
Thanks!
 
P

puiuluipui

Hi, thanks for everything. I just remember i didn't click on yes. :).
I keept questioning, but not voting. Sorry.
Hope you can help me with my last post.
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top