Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default If cell not empty, then display from range

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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default If cell not empty, then display from range

=IF(COUNT(A2:L2),LOOKUP(2,1/(A2:L2<""),A1:L1)+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!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default If cell not empty, then display from range

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!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default If cell not empty, then display from range

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!

"Teethless mama" wrote:

=IF(COUNT(A2:L2),LOOKUP(2,1/(A2:L2<""),A1:L1)+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!

  #5   Report Post  
Posted to microsoft.public.excel.misc
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!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default If cell not empty, then display from range

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


"puiuluipui" wrote:

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!

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default If cell not empty, then display from range

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!





"Teethless mama" wrote:

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


"puiuluipui" wrote:

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!

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default If cell not empty, then display from range

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!

"puiuluipui" wrote:

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!





"Teethless mama" wrote:

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


"puiuluipui" wrote:

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!

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
Custum Cell Format - display 0 (zero) when cell is empty willemeulen[_15_] New Users to Excel 8 May 21st 09 04:03 AM
How can I display symbols in phone # formatted cell when empty? Sandi Rutalnd Excel Worksheet Functions 1 January 21st 09 05:46 AM
Display Empty Cell When Using SUM formula Koomba Excel Worksheet Functions 8 September 29th 08 05:15 AM
How do I set a cell to "Empty" so that it does not display in a ch Ian Charts and Charting in Excel 3 January 7th 05 01:12 AM
Display a dialog box if cell is empty jst Excel Discussion (Misc queries) 2 December 28th 04 11:59 AM


All times are GMT +1. The time now is 01:32 PM.

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

About Us

"It's about Microsoft Excel"