Solved How do i use nesting in this example?

October 31, 2015 at 13:40:24
Specs: Windows 7
I have two Columns with dates C and D and I want either a date from columns B or C which ever is the earliest in Column B. If the cells in C and D are blank I want it to return N/A in Column B.

A B date 1 date 2
Mayo 1/1/2015 1/2/2016
Mustard 2/5/2016 3/1/2015

message edited by poppak

See More: How do i use nesting in this example?

Report •

October 31, 2015 at 19:40:22
Please click on the blue line at the bottom of this post and read the instructions on how to post example data in this forum. Then repost your data so that the columns line up. Be sure to use Column letters and Row numbers so that we can use the correct references in any formula we may suggest.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

November 1, 2015 at 10:34:39
Thanks DerbyDad03, Let me try this again.

To clarify what I am doing for everyone. I have a spread sheet that is complied of items in my clinic that may or may not have an expiration date. That depends on the manufactory. An inventory is conducted on each room, complied on one spreadsheet. The tabs are labeled as follows (tab1) Hard Items, (tab2) Room1, (tab3) Room2 etc.
I am trying to pull the earliest expiration date from the room onto tab1 Hard Items and for the items that do not have expirations dates "N/A'" displayed in tab1 Column G. I used the "IF" function and can get the dates pulled however when there is no date listed I end up with a date of 1/0/1900. I hope this clears up some confusion.

		A			  G                                H
   Description of Item	           Earliest Expiration 	              Days Left
6   Ace Bandage	3 inch		       9/1/2015	                            61
7   Ace Bandage	6 inch		      11/1/2015	                             0
8  Airway-Nasal	26 fr.		       1/0/1900	                          42309
9  Airway-Nasal	28 fr.		       1/0/1900	                          42309


Report •

November 1, 2015 at 11:42:21
✔ Best Answer
It would seem you have 6 possible outcomes:

Rm 1 Date Blank       & Rm 2 Date Blank     = N/A
Rm 1 Date not Blank   & Rm 2 Date Blank     = Rm 1 Date
Rm 1 Date Blank       & Rm 2 Date not Blank = Rm 2 Date

Rm 1 Date Less Than     Rm 2 Date = Rm 1 Date
Rm 1 Date Greater Than  Rm 2 Date = Rm 2 Date
Rm 1 Date Equal to      Rm 2 Date = Either ???

What happens when the Dates are equal?
Does it matter?

Try this, I've taken the liberty of changing your formula


so if the Date in Rm 1 is Less Than or Equal to Rm 2 we use the Rm 1 date.


If this is not OK let us know.


It's a bit long so you might want to Copy & Paste it.


Report •

Related Solutions

November 1, 2015 at 12:01:44
Thanks Mike it works great just what the doctor ordered.

Report •

Ask Question