Cells(#,#).Value conversion #2

Hey I want to grab a serialized date and turn it into an integer in my
vba
what is the proper conversion for this ?

example:

Dim startDate As Integer
Dim endDate As Integer

startDate = ActiveRow.Cells(1, 2).Value
endDate = ActiveRow.Cells(1, 3).Value

0
8/2/2005 4:09:12 PM
excel 39879 articles. 2 followers. Follow

1 Replies
647 Views

Similar Articles

[PageSpeed] 4

A date is already an integer, just format it as General.

-- 

HTH

RP
(remove nothere from the email address if mailing direct)


"Alexandre Brisebois (www.pointnetsolutions.com)"
<alexandre.brisebois@gmail.com> wrote in message
news:1122998952.048872.181990@g44g2000cwa.googlegroups.com...
> Hey I want to grab a serialized date and turn it into an integer in my
> vba
> what is the proper conversion for this ?
>
> example:
>
> Dim startDate As Integer
> Dim endDate As Integer
>
> startDate = ActiveRow.Cells(1, 2).Value
> endDate = ActiveRow.Cells(1, 3).Value
>


0
bob.phillips1 (6510)
8/2/2005 4:41:22 PM
Reply:

Similar Artilces:

How can I insert a cell reference in a footer (eg for variable foo #2
Any ideas on how to do this? I'm trying to create a template with the doc reference number in the footer However, I'm trying to avoid users having to edit the footer (because this just wont get done). Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.LeftFooter = .Range("A1").Text End With End Sub This code should go in the ThisWorkbook code module. -- HTH RP (remove nothere from the email address if mailing direct) "wngg001" <wngg001@discussions.microsoft.com> wrote in message news:8A0F9D9E-269F-45CF-A6E3...

Test Mail...Please Ignore #2
Testing NNTP Client, Please ignore message Thanks ...

VBA
I have created code that inserts lines into a financial statement but need to have certain cells in other code stay constant. B1 in certain code must stay at B1 regardless of changes to the spreadsheet. Any suggestions?? --- Message posted from http://www.ExcelForum.com/ Use the INDIRECT function. E.g., =INDIRECT("B1") The B1 will remain so regardless of inserting and deleting rows. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "bforster1 >" <<bforster1.1cmxzp@excelforum-nospam.com> wrote in m...

How to convert to absolute value?
Hello! How do I convert numbers to absolute value? Thanks Edit - Copy. Edit - PasteSpecial - Values - OK. Or do you want a code solution ? HTH. Best wishes Harald "Betsy Marlow" <cmarlow22@bellsouth.net> skrev i melding news:5WmHg.12873$j8.11911@bignews7.bellsouth.net... > Hello! > > How do I convert numbers to absolute value? > > Thanks > > Print abs(-12) 12 On Thu, 24 Aug 2006 15:16:31 -0400, "Betsy Marlow" <cmarlow22@bellsouth.net> wrote: >Hello! > >How do I convert numbers to absolute value? > >Thanks >...

Drop down menu #2
Is is possible when you have a drop down menu, to have excel short list the menu as you type in more charcaters of the text. For example a have a list of several hundred customers. I start inputting the first few letters of the customers name, I would like that list of several hundred to be shortened to only include thaise customers that begin with the letters I have typed in. Thanks Think this previous post by Debra Dalgleish would be of help: "Although data validation doesn't support autocomplete, there's a sample file here that provides a combobox from which you can se...

Don't plot zero values
I am currently using Excel XP. I have a scatter chart and would only like to plot non zero values. These are not null values. Is there a chart setting I can do to skip plotting zero values or do I need to somehow filter/sort the data first and then plot? TIA George Hey George - If there are true zeros in the data, perhaps the easiest way to exclude them from the chart is to use an autofilter on the data that hides the rows with zeros. Alternatively, you could insert a column to hide the zeros. Say the range with zeros is in B1:B10. Select C1:C10, and enter this formula into C1: =IF...

Associated external Account #2
Dear all, Just got some of our exch2k users migrated to another org exch2k3. Found that associated external account rights which never seen before in 2k. Wish to know the purpose of this account and when is the best time to use it. Please help and thousand thanks. regards Granting Access to External Accounts http://www.microsoft.com/technet/prodtechnol/exchange/guides/WorkingE2k3Store/8c4befe3-3815-4b6b-a759-1e5a2878499d.mspx -- Bharat Suneja MCSE, MCT -------------------------------- "Elton Seng Yan Thung" <sengy01@pd.jaring.my> wrote in message news:enFBAvpwFHA...

virus scanning #2
I really get prompted for "requesting virus scan", and I don't know ho to disable it; the warning is located beside ready, in Excel bar -- Gerbati ----------------------------------------------------------------------- Gerbatin's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1523 View this thread: http://www.excelforum.com/showthread.php?threadid=27651 What antivirus software do you use? I think/hope the solution will involve a setting that you can toggle in that program. (maybe you missed an option???) The antivirus program doesn't have t...

Pivot Table fields #2
Is there a way to format multiple pivot table fields at one time and have them refresh that way, rather than having to select each column and choose the format options? Thanks CLou: I think the solution for you is to open the Pivot Table Toolbar and select the Field Settings icon. This sets the format for all results for that particular field. One limitation that I haven't found a way around is getting a preferred column size to "stick" and not reset after a table refresh. Bruce >-----Original Message----- >Is there a way to format multiple pivot table fields at ...

2 questions about Exchange Server 2000
1. How, or where, do I find out where Service Pack level I have installed? I see that I downloaded SP3, but I can't tell if it was ever installed. 2. Clients have Outlook 2000. Inbox is open. Last message is selected. No new mail. Then, if you click on a different message, you get the "new mail has arrived..." message. It seems to only deliver new mail when you change messages. Any thoughts? 1. In Exchange System Manager, highlight the Servers container. It should show you all servers in the right pane along with their service pack level. 2. Sounds like something is b...

Turn data #2
Is there a way to turn the data in an Excel spreadsheet so that what is on the top is now on the side and what is on the side is now on top? I need to export my spreadsheet into Access but, I can't get it to format correctly in its current orientation. ~Make a backup copy of your data to work from (just in case, so you don't lose data) ~Highlight the entire range of data; click >Edit >Copy ~Choose a new location, on a different sheet perhaps; click >Edit >Paste Special and select the Transpose box; click OK Does that do it for you? thank you so much. You are a genius...

Only 1 taskbar button when i open 2 excel documents
Hi all. When i open 2 excel documents i have only 1 taskbar button on the taskbar even though i did not choose the option to group similar taskbar buttons under taskbar properties. Hence when i want to switch between the 2 documents i need to go to window and select them. Hence how do i solve this so that i can have 2 taskbar buttons of the excel documents on the taskbar? Thks in advance. Tools>Options>View, check Windows In taskbar -- HTH Bob Phillips "inenewbl" <inenewbl@discussions.microsoft.com> wrote in message news:6F715432-2EB2-47AC-B737-56D63F37537A@mi...

Business Cards #2
I am trying to create business cards using Microsoft Publisher 2002 on XP. Where would I find the template for Avery 8397, or for any of the Avery business card products. In page setup, select business cards, click Change copies per sheet and adjust the margins to fit your template. Avery has blank templates for downloading, choose Cards, there will be a list to select from. Your number was not among them but generally business cards are pretty much alike. http://www.avery.com/us/Main?action=software.BlankTPLHierarchy&catalogcode=WEB01&node=0 -- Mary Sauer MS MVP http://office.mi...

displaying negative values
how do I hide the display of negative numbers? =if(A1<0,"",A1) HTH Regards from Brazil Marcelo "cfuller" escreveu: > how do I hide the display of negative numbers? Hi, That will work if cell A1 has a formula in it. If negative numbers are just typed in, you can use conditional formatting. Highlight the range of cells you want to format. Go to Format > Conditional Formatting... Enter cell value is less than 0. Click the Format... button and select Color: and then click the white icon. HTH -- Ken Hudson "Marcelo" wrote: > =if(A1<0,"&qu...

diable command button based on field value
I have a command button which I would like to disable based on the following rules: If A = 1 then button is disabled If B = 2 then button is enabled Where you put the code depends on how the form works. If this needs to be checked for each record, use the form current event: If A = 1 Then Me.Button.Enabled = False ElseIf B = 2 Then Me.Button.Enabled = True End If But, what if A is not 1 and B is not 2? -- Dave Hargis, Microsoft Access MVP "barrynichols@gmail.com" wrote: > I have a command button which I would like to disable based on the >...

Can not create Matrix Item please Help RMS 2.0
RMS 2.0 Can not create Matrix Item please Help When trying to create any new items I receive error message This is the message (-2147217864) Row Cannot be located for updating. Some values may have been change since it was last read. Manger still creates standard items but still receives message with out this number in message -2147217864 ...

Macro Recorder #2
I have a very basic question( I think). When you are recording a Macro how do you stop and then restart where you left off? For example I have a repetitive task that moves columns from one spreadsheet to another. The problem is that there are about 40 columns I am required to move. As I record the macro can it be stopped and then restarted if I have to close Excel and return later? I can't find the answer to my question documented anywhere. Thank You, Greg You can stop it, but when you start again it will create a new subprocedure, you can go in and copy/paste the second after the firs...

Date Range #2
Hi, Can someone please assist me with the following issue: I am currently using the formula noted below to direct another application ( Bloomberg ) to select prices from the previous 6th business day. My question is> Is there any way to revise the formula to exclude US holidays for successive years (i.e. for 2005, 2006...) without having to manually change the date entries each year, in the formula? =WORKDAY(Today(),-6, {"5/31/04","7/5/04","9/6/04","11/25/04","12/25/04","1/1/05" }) Thank you I'd recommend listing...

2 mirror files with :1 and :2
Not sure how, but have 1 excel file, lets call it FILEA.xls and when I open it, it opens a FILEA:1 and a FILEA:2 workbook. Any change made to FILEA:1 gets repeated in FILEA:2 and vice versa. Looks like some sort of mirroring, or changes being tracked, but track changes is turned off. Any help is appreciated! Hi you've opened two windows of the same workbook (from the window /new window menu) - just close one and then save - this should solve the problem Cheers JulieD "DJR" <DJR@discussions.microsoft.com> wrote in message news:F0F6BDF5-9DC2-486E-947C-ABBB6C4544...

Using a Text / Data output as a cell reference
I am trying to use the end of a column as a divisor and need to convert what i guess is text into an actual cell reference if possible. In column A, say there are 13 data points ending at cell A13. I then try to turn that into a cell reference with the formula ="A"&TEXT(COUNTA(A1:A13,),"0") I put this formula in B1 the output of this is then A13 what i need this to do, is be able to divide any cell by A13. The reason I am going through all this trouble is that there are many columns and each has a different # of data points. I hope this is somewhat clear. Thanks ...

Cell QA for Bob Phillips
Good afternoon Bob: In reference to your QA: (Which sheet was the active sheet when you right-clicked on the tab? It should have been Data Sheet). Yes, I did as you said, but I am not sure I placed the text string in the right place. I pasted it in View Code on the blank area to the right of "Project / Properties" section but for some reason it is not moving the text from "Data Sheet" to the "Activity Sheet". Is it possible to communicate with you directly so I can get this worked out? Thanks John ---------------------------------------------------...

parameter values not valid #3
keep getting a window each time I try and save a new task (Outlook 2000) it says: "Could not complete the operation. One or more parameter values are not valid" I just set up Outllook, and can't figure out why it would do this. ...

Uninstalling Office 2003 Service Pack 2
I have installed the Service Pack 2 for Office 2003 and have decided that it causes too many problems with Outlook 2003. For example, it sees certain emails as "Junk Mail" and (evidently) believes them to be "phishing". Even after placing these emails in my Inbox and adding the sender to the white list, it refused to allow me to open links from any web page link within the email. I understand that I cannot simply uninstall Service Pack 2, that I must install Office 2003 and then reinstall, without, of course, reinstalling the Service Pack. But if I do that, I wonder...

Comparing Worksheets #2
I have 2 worksheets that should be identical. One I know has been changed. Is there any way to compare the 2 to track changes. Darryll One way is to use a third sheet. In A1 type =Sheet1A1=Sheet2A1 This will return TRUE or FALSE. Fill this across and down as many as you need Andy. "Darryll" <Darryll_lamb@hotmail.com> wrote in message news:2618f01c38e4c$0c390cf0$a601280a@phx.gbl... > I have 2 worksheets that should be identical. One I know > has been changed. Is there any way to compare the 2 to > track changes. Thanks for your help Andy. All seems ok. >-----...

How to determine the closed value?
There is a number 14 in cell A1, and there is a list of number under column B, for example, 8, 11, 16, 18, 21 I would like to determine the value within the list, which is closest to 14, and 16 should be returned in cell A2. 8, 12, 16, 18, 21 I would like to determine the value within the list, which is closest to 14, and because 14 is between 12 and 16, then I prefer the larger number, and 16 should be returned in cell A2. Does anyone have any suggestions on how to do it in Excel? Thanks in advance for any suggestions Eric Hi Eric, this should do it: =INDEX($B$1:$B$5,L...