Need help wit this formula

Get_Involved

Active Member
Joined
Jan 26, 2007
Messages
383
I have searched,and restructured the formula all this and can't get to retu

I have this formula that is supposed to give the number of days from Cell “P2”

It is returning the number (43850.07) which is 1/20/20

The answer is supposed to be 90 days

Code:
IF(AND(D31="Discount",$J$2>=0),(NOW()-$P$2),"")

These cell numbers are the cell numbers I am using, also I have even tried to reformat the cells each way possible
 
Date & Time of DiscountDate Before Next Lower Discount Drop30-Apr-20
31-Jan-20
Item NumberDays Left to Make a DiscountSoldDate SoldBrand NameNew or UsedDescriptionSize
043861Discount12/19/2019WranglerUsedLadies Western ShirtLarge
Excel_Spreadsheet.jpg
Excel_Spreadsheet.jpgExcel_Spreadsheet.jpg
Excel_Spreadsheet.jpg
Excel_Spreadsheet.jpg

Everything in this jpg is in the same spot as the formula, I did move the Start Date to F2, & the end date to I2 so you can see it
Hope this works for you
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
That looks suspiciously as though the cell where 30-Apr-20 is located is a merged cell.
Is that the case?
 
Upvote 0
In that case that's your problem, if P1:P2 is a merged cell P2 is blank.
Change your formula to look at P1
 
Upvote 0
I got it, I unmerged the cells and widened P2 this is the formula I made to get it to work
Code:
=IF(AND(D31="Discount",$F$2>=0),-(NOW()-$I$2),"")
Thank you, I have been working on that for over a week, merged cell was the main problem
Thank You
 
Upvote 0
Glad it's working & thanks for the feedback.
It's best to avoid merged cells as they can cause all sorts of problems, as you've discovered. ;)
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,195
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top