Need some help adding/changing information in a database sorted by date

Flammy

Board Regular
Joined
Apr 19, 2011
Messages
51
The database is sorted by date, in the format 1/1/2010. There are entries for every day between June 2007 and now. I am building a form that will allow the user to add a new day's worth of information to that days row (add today's info, or yesterday's if you forgot to enter it, or for any day if you enter it in a text box). What I am having trouble with is how to reference the date because it is not a 'normal' number like an integer.

I can provide a few lines of the database or screenshots of the form if it would help.

Thanks.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
please do provide a few lines - will be easier to understand. also, excel stores dates as numbers. say, today's date (Apr 24 2011) would be 40,657 - you can use those numbers in formulas or VBA just like any other numbers, i.e. in vlookups, etc.
 
Upvote 0
Three columns, first is day number (from the start of my database), second is day of the week (unimportant), 3rd is date formatted as a date. there are more columns to the right but they are unimportant for now.

<table border="0" cellpadding="0" cellspacing="0" width="215"><col style="width: 48pt;" width="64"> <col style="width: 60pt;" width="80"> <col style="width: 53pt;" width="71"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 48pt;" align="right" height="20" width="64">1217</td> <td style="width: 60pt;" width="80">Friday</td> <td class="xl65" style="width: 53pt;" width="71">1-Oct-10</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="right" height="20">1218</td> <td>Saturday</td> <td class="xl65">2-Oct-10</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="right" height="20">1219</td> <td>Sunday</td> <td class="xl65">3-Oct-10</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="right" height="20">1220</td> <td>Monday</td> <td class="xl65">4-Oct-10</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="right" height="20">1221</td> <td>Tuesday</td> <td class="xl65">5-Oct-10</td> </tr> </tbody></table>
the date is displayed as 10/1/2010 when I click on the cells. are you telling me that if i search for a value like the one you posted it will find one of these cells?
 
Upvote 0
search as in ctrl+f? no. but it will find a match if u use vlookup, match, or any other similar function. it will return TRUE if you were to write smth like =A1=40,657, etc.
 
Upvote 0
OK, thanks. Is there an easy way to get what any given date's corresponding number is?

Also, if there is a button that says "add today's data as 1" or something, is there a function that knows what date it currently is to assign the value of 1? (time unnecessary, but I guess I can round from what I saw of how excel manages time)
 
Upvote 0

Forum statistics

Threads
1,224,543
Messages
6,179,429
Members
452,914
Latest member
echoix

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