Count the number of days.

wkirkcrawford

Board Regular
Joined
Dec 7, 2013
Messages
72
Greetings,

I keep a diabetic log that is usually 6 months or so. One insulin pen last 28 days and I have a column that I note starting a new pen. I usually have don’t use it all by the 28th day. Therefore, I need to replace that pen.

Today, I’m taking that pen twice a day. Usually, I run out before the 28th day now. But not always.

So, I need a way to flag me when I need to replace it. Therefore, I assume it would be something using Conditional Formatting.

W. Kirk Crawford
Tularosa, New Mexico
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hello WKirkCrawford

I'm not sure if this is what you are needing or not, but maybe it will get you started in the right direction. I assume your data starts in row A2. First, I formatted the 'A' column as DATE. You can pick which option you prefer. Then in cell 'A2', I entered today's date as 2019/2/4, the date you started using a new pen. The second thing I'm assuming is that you want to order a new pen a few days before your old one is finished. If the old one lasts 28 days, I randomly picked 25 as when you'd want to order a new one, which would give you a three day advance warning. You can adjust that number to suit your needs. Using my examples, cell 'B2' would show March 1, 2019 as 25 days after you started using that pen.

In cell 'B2' I entered the following formula and copied/pasted it down the column.


Code:
[COLOR=black][FONT=Calibri]=IF(A2="","",A2+25)[/FONT][/COLOR]

I hope this helps.


TotallyConfused
 
Last edited:
Upvote 0
Totally,

It's a start, but I'm trying to insert a snapshot or screen dump of what I'm talking about. Can't seem to get it to work.

The column when I get a new pen, I put an asterisk on that date.



W. Kirk Crawford
Tularosa, New Mexico
 
Last edited:
Upvote 0
Re: Count the number of days. Link added

I've add most of my log.
Where's the red asterisk, it the day I started using a new PEN.
I want to know when it's time to start using a new pen after 28 days.

W. Kirk Crawford

All ReadingsBreakfastLunchDinnerBefore SnackSugar Drops
High255Avg. time between the last shot.High172Avg. time between the last shot.High193New Pen Avg. time between the last shot.High255HumlogHigh199High91
Low71Low108Low85Low110Low94Low71
Average151Average145Average127 Average190Average148Average81
Median150Median149Median122 Median183Median151Median81
Date:Morning13:36ReadingUnitsAfternoon5:33ReadingUnitsDinner4:46ReadingUnitsUnitsTimeReadingTimeReading
1/16/201912:10 PM9874:00 PM3:491821897:56 PM171
1/17/20195:42 AM13:421292411:01 AM5:1910474:02 PM5:012091897:59 PM147
1/18/20195:14 AM13:111312411:02 AM5:4713284:01 PM4:5922218107:59 PM132
1/19/20196:14 AM14:121082411:06 AM4:5118894:20 PM5:142161898:04 PM167
1/20/20196:15 AM13:541462411:56 AM5:4011694:08 PM4:121911898:02 PM119
1/21/20196:05 AM13:571512411:03 AM4:579774:02 PM4:591771898:01 PM147
1/22/20195:36 AM13:331492411:09 AM5:3311174:06 PM4:561591888:05 PM127
1/23/20196:00 AM13:541552411:05 AM5:0512294:01 PM4:5623918118:00 PM166
1/24/20195:54 AM13:521572411:01 AM5:0613794:11 PM5:101101878:02 PM103
1/25/20196:29 AM14:181302411:09 AM4:3912484:14 PM5:041701888:01 PM157
1/26/20195:54 AM13:401282411:07 AM5:1313084:12 PM5:0422618108:01 PM110
1/27/20195:43 AM13:311282411:59 AM6:1610094:05 PM4:0525518128:02 PM12312:33 PM71
1/28/20195:49 AM13:441512411:06 AM5:1614784:02 PM4:551681888:02 PM168
1/29/20195:22 AM13:201502411:01 AM5:3811874:01 PM5:001921897:58 PM947:21 AM91
1/30/20195:51 AM13:501612411:06 AM5:1413284:13 PM5:071631888:00 PM192
1/31/20195:35 AM13:211442411:09 AM5:3412984:03 PM4:541531888:04 PM175
2/1/20195:39 AM13:361722411:03 AM5:238574:16 PM5:1322618107:57 PM131
2/2/20195:02 AM12:45157241:31 PM8:2812085:33 PM4:0224318107:58 PM146
2/3/20195:53 AM12:201712412:11 PM6:171017*4:06 PM3:541901898:07 PM199
2/4/20195:16 AM13:101492411:01 AM5:4519394:02 PM5:011621888:02 PM168
2/5/20195:35 AM13:321462411:07 AM5:3212183:06 PM3:5818118910:19 PM151
2/6/20196:13 AM15:061722411:02 AM4:4913884:02 PM4:591581888:00 PM164
2/7/20195:12 AM13:101192411:04 AM5:5117494:02 PM4:581831898:01 PM154
2/8/20195:17 AM13:1412324

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Re: Count the number of days. Link added

Sandy666,

What's so complicated about it?

W. Kirk Crawford
Tularosa, New Mexico
 
Upvote 0
Re: Count the number of days. Link added

Hi,

If I understand correctly...

You would need to replace the "Pen" when it's depleted or on the 28th day (maybe 29th day), whichever comes first, is that correct ?

It's kind of difficult to follow your Table as shown above, probably easy for you since you created it.

Which column shows, How many times the "Pen" has been used since last replaced, and the date it was last replaced?

Also, need to know, How many times can a "Pen" be used, and whether it expires on or after the 28th day.
 
Upvote 0
Re: Count the number of days. Link added

Sandy666,

Would you like the file?

W. Kirk Crawford
Tularosa, New Mexico
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,273
Members
449,220
Latest member
Excel Master

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