#### calculate number of years

```the website says to calculate number of years type: =year(A3)-year(A2).  when
i type this is i get a weird answer.  problem is not that i get the number
signs....i get a date 1900.  for example: 1/1/1900 0:00.  please advise for
this is for homework, university.  thank you to whomever responds.

D L Barnard
```
 0
DLBarnard (2)
1/26/2005 12:15:03 AM
excel.newusers 15348 articles. 2 followers.

1 Replies
438 Views

Similar Articles

[PageSpeed] 50

```Format the cell for General or Number, not Date. Or, you can use
the DATEDIF function:

=DATEDIF(date1,date2,"y")

DATEDIF.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"D L Barnard" <DLBarnard@discussions.microsoft.com> wrote in
message
news:2E4E83C7-D554-4F8A-91FC-17B1EFCCB612@microsoft.com...
> the website says to calculate number of years type:
> =year(A3)-year(A2).  when
> i type this is i get a weird answer.  problem is not that i get
> the number
> signs....i get a date 1900.  for example: 1/1/1900 0:00.
> this is for homework, university.  thank you to whomever
> responds.
>
> D L Barnard

```
 0
chip1 (1821)
1/26/2005 12:19:09 AM

Similar Artilces:

sequential number
I want to a sequential number to fill in automatically each time the form is filled out. Malissa, A simple way would be to use something like this, you could assign it to a button, an open or before print event. Sheets("Sheet1").Range("A1").Value = _ Sheets("Sheet1").Range("A1").Value + 1 For other ways to do this or if this is going to be used in a temple have a look here http://www.mcgimpsey.com/excel/udfs/sequentialnums.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others...

Export to excel from ASP.Net
I have a page wherein the contents of a datagrid are exported to an excel file. All the columns are correctly displayed in excel except for the number columns. The formatting string for the number column is {0:#,##0.00; (#,##0.00);0.00}. The data is formatted for all numbers exceeding 1000 but for any number below 1000 the data is displayed as 1000 and not with 0's in the decimal places. (displayed as 999 instead of 999.00). ...

Iterative Calculation help needed
I have the following information A1 - Balance at the beginning of calculation A2 - Annualized payment A3 - Interest rate divided by # of payments per year A4 - Number of years * # of payments per year I'm trying to calulate the total ((A1-A2)*(1+A3)) - I need to do this over and over up until I've don it A4 times. I can do it for each period but I want to do it all in one cell, i possible. How can I have it plug the new number into A1 and repeat th calculation A4 times. Thanks -- Message posted from http://www.ExcelForum.com Hi there You might find that the PMT function coul...

Comments on Manual Calculation on certain sheets.
I have a sheet in a workbook with array functions that slows down performance with calculation on automatic (which I need for the other sheets). Would it not have been useful to be able to set a single sheet to Manual and update when needed in the same way Pivot Tables work? One way to work around this is to save the Array Formula sheet in another workbook. I have browsed some of the posts on Excel's way of handling Automatic/Manual recalculation and it seems as if there is room for improvement or are there important reasons that I am not aware of? Any comments. Laurence Lombard Hi ...

Question on Returns to Vendor without PO & Receipt number
Our company switched to Great Plains Dynamics from Simply Accounting 3 months ago. We currently need to return some of the inventory items to our vendors. However, when we try to enter a transaction entry in Purchasing/Returns Transaction Entry, in the detail lines we are asked for the PO number or the receipt number. We are not allowed to go further or save without the PO number or receipt number. When we converted from Simply Accounting, all we entered was the beginning balance of the vendors and only the PO's which we expect to receive. The older PO's were not carried over. W...

Emailing Tracking Numbers
I have integrated a website with RMS. When orders come in, I make them a workorder and send a PO to the distributor that will ship the product. At the end of the day, the distrbutor sends me the tracking number. When I bring up the customers order and enter the tracking number, I then complete the transcation, then press Shift/Control/F8 to mark the order processed. Does this send the tracking number to the customer? If not, how can I do that with out going to Outlook and physically doing so? Bill, RMS does not send one. Sounds like a good idea though. Maybe add it to the sugge...

Select a certain number of cells in a row
Hi, I'd like to have the macro to select row 5 to 10 in the active column. May I know what is the VB code to write? Regards, Valerie maybe... dim myRng as range dim myCol as long with activesheet mycol = activecell.Column set myrng = .range(.cells(5,mycol),.cells(10,mycol)) end with myrng.select ======= or with activesheet .cells(5,activecell.column).resize(6).select end with I'm not quite sure why you want to select that range. But for the most part, if you act directly on the range (and avoid .selects), you're code will work faster and be easier to modify. Dolph...

writing calculated fields
I am trying to avoid starting a Crystal report from scratch, please help me! I need to use the equivalent of the "If, Then, Else" formula in Crystal reports in Report Writer. I need my PO in report writer to: if {IV00101.UOMSCHDL}="xxxxx" then (PO ordered QTY * 30) else if {IV00101.UOMSCHDL}="xxxxx" then (PO ordered QTY * 40) else PO ordered QTY I can only place PO's to the vendor in eaches but I am entering the PO into GP in cases. I have the PO processing side setup correctly, I just need the PO to print now. Thank you! -- CK Create two new calculate...

Window's verson numbers
I'm writing an app in C++ using VS.net and I need to do this based on the OS. I can get the OS version number using _osver global variable found in the include STDLIB.H. But I need a list of what version number correspond to what OS so I know what the value in _osver means. Does anyone know where I can find these definitions? Also the major and minor builds might be useful? If this is the wrong newsgroup could you direct me to the right one? Thank Lots, Neil Neil B wrote: >I'm writing an app in C++ using VS.net and I need to do this based on the OS. >I can get the OS ver...

2007 Slide Numbering doesn't work
I have a presentation in which the numbering doesn't work...I've gone step by step through everything I can find but I don't see it. Checked the master to ensure a placeholder was there, that the text is visible. I click on the slide thumbnail, click insert / slide number, check off slide numbering, click apply to all and okay. Nothing appears. When I go back to insert / slide number, nothing is checked. Any thoughts? Try ticking the option for slide number in Insert | Header and Footer instead. -- Echo [MS PPT MVP] http://www.echosvoice.com What's ne...

macro to generate next number
Hi, i need a macro to look in sheet 2 column A and look at the last filled cell. In the last filled cell i have a number. When i run macro, i need to generate (in sheet1 A1) the number from the last filled cell +1. EX: sheet 2 last filled cell = 29 sheet1 after macro i need to have in A1 = 30 Can this be done? Thanks! Hi, Yuo can have a macro if you want but you don't need one, try this =OFFSET(Sheet2!A1,COUNTA(Sheet2!A:A)-1,0) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still suffici...

List number of permutations for text nums
I've got 4 digit text nums in A1 down In B1 down, I would like to list the corresponding number of permutations, eg: 7777 1 1777 4 0044 6 2477 12 1234 24 Game for any formula, udf or other vba solution Thanks for insights Sub permutations() Dim I As Integer, J As Integer, Rng As Integer Rng =3D Cells(Rows.Count, "B").End(xlUp).Row J =3D 1 Range("A1").Select Do Until ActiveCell.Value =3D "" For I =3D 1 To Rng Cells(J, "D").Value =3D "'" & ActiveCell & Cells(I, &qu...

page number
How do I remove page number from single pages, not only frontpage You can either insert a section break either side the un-numbered page and change the numbering in the new section or you can conditionally insert the page number in all the pages using fields e.g. {IF {Page} <> 4 "{Page}"} will insert the page number on all pages except page 4. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mv...

Convert Text to Number on 4,508 excel files.
Hi all. I'm faced with a rather unique problem.I have a large amount of improperly formatted excel files. They all have various cells formatted as text, yet they contain numbers and perform calculations on the cells. I now need to get these in a proper state. What I need is: Conversion of all text boxes containing numbers over to proper format of number. Do it automagically. I don't relish the thought of opening each one individually and fixing it. Any thoughts, tips or ideas on this? It could possible if you process that works by Scripting . In Scripting engine 5.6 Filesystem...

Automatic calculation
Hi I have a workbook that takes an eternity to calculate and therefore, have the calculation mode set to manual. I would like the calculation mode set to Automatic when the workbook is deactivated or closed, but do not want the workbook to be calculated when this happens. Is that at all possible? Thanks in advance Ben You could use workbook events that fire when the workbook is activated/deactivated. Rightclick on the excel icon (to the left of File|Edit|...) on the menubar. Select view code and paste this in the code window. Option Explicit Private Sub Workbook_Activate() Applica...

21st century years
I have a column of maturity dates which I converted to Excel dates using DATEVALUE. The dates all had two digit years. DATEVALUE converted years prior to 30 in the 21st century, and years greater than 30 in the 19th. But I want them all in the 21st century. Some years go up to 51. I figured my regional settings were the culprit, so I changed the two-digit year option from 2030 to 2055. No success. So I closed Excel, rebooted, loaded the file again, but still no success Any ideas where I look next? -- Regards, Fred Please reply to newsgroup, not e-mail Assume your dates are in column A ...

Calculating with textboxes
Dear all; I have a UserForm with a few textboxes. The first textbox : tbAmount holds an invoice amount. The second textbox: tbVAT should display the amount of VAT ( 19 % of the amount ) The formula I use is: .tbVAT.Value = .tbAmount.Value * 0.19 Looks fine to me. But, the stupid box don't disply the right amount. I live in Europe and the Regional settings are a dot ( . ) for the thousands seporator and a comma ( , ) for the decimal seporator. When I enter 2250,00 ( or 2250 ) in .tbAmount, then textbox .tbVat displays : 427.5 which is not what I want as I ho...

Incrementing Numbers ?
Hello, I have a column with, e.g., two numbers in it. Say a 2 and the next one down is a 4. How do I select one or both so that I can simply just drag down and have a long column with: 2 4 6 8 10 etc. And, if there are already a lot of numbers in the column, must one delete them first for the scheme to work ? I tried a few methods, but just can't seem to get it to work. Also, couldn't find anything in the HELP menu for this. Thanks, Bob Select both cells then drag the bottom right corner down. The cursor turns into a small black cross when you hover over the bottom right corner ...

Safe Pay Confirmation Number
Is there anyway to remove the prompt for a confirmation number that Safe Pay displays after you hit the Upload button? I want it to save the last upload date and the results of the ME123504 table without having to enter that number. Thanks, ...

Finding pairs of numbers
Is this possible? I assume this will involve some VB coding also: Part Num Associated Part Num 123 456 789 5623 8521 6352 456 123 5478 9821 444444 AT256 5623 789 Formula in "C" that would find the mate and insert a "Pairing" number So that the 1st and 4th rows would have a 1 and the 2nd and 7th would have a 2 etc This subroutine will do it - change the range in first statement to suit you needed Sub tryme() Set testrange = Range("A1:C20") For j = 1 To testrange.Count - 1 testA = testrange(j, 1) & testrange(j, 2) Fo...

Top 90% of records
Have the oddest SLA requirement I've ever been asked to have a look at, hope you can help. Basically have a set of data of closed records for 2005. My manager wants to show of the closed records how many days were 90% of them completed? She is looking at this as a 'best case' scenario, so therefore in simplistic terms this means: If there were 50 records closed, look at 90% of these records (in shortest amount of days order) and give the highest number once at 90%. e.g. (with a small dataset). There are 50 records. The largest number of the dataset once sorted is 20 (at the 4...

VBA code to capture Computer device unique ID number
I am seeking knowledge of how to write a VBA code in access 2003 that allows me to call a property function by which I can capture a unique number which identifies the computer hardware device. I am thinking of something like the MAK Number that is associated with the hardware of interest since it is unique and cannot be repeated in any other device. The purpose of this function is that I would grant accessibility for users to my database application only if the hardware can be identified in a table that contains approved MAK numbers. I would greatly appreciate the help I can get in thi...

Converting Hexadecimal number to floating point decimal number #2
Thanks McGimpsey, the hex number will appear in a single sell say A1 a like 0X00 0X0f 0X7b 0Xa1 0x39. What I need is to automatically conver this hex string into a decimal like 2.4e-5. That is automaticall stripping off the prefixes and convert each segment of the hex string Its not just taking a single hex number -- Fif ----------------------------------------------------------------------- Fifi's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1232 View this thread: http://www.excelforum.com/showthread.php?threadid=27285 ...

Showing a cell that corosponds with the highest number
I am making a results table for pool games. I've got it to calculate the points (3 for a win) and (take 1 for loss) but I want it to show the players name that has the most points It's layed out like this --------------Points Player1------ 1 Player2------ 4 Player3------ 3 I would want it to show Player2 in the cell. I have used sumif to find all the winning games, then i've times tha cell by 3 to get the points, ive also used sumif to find all the usin games, and then i've taken it away. This shows the number in the point box. I need to find the row with the biggest numb...

want only last four digits of number
I wish to format a column of numbers so that only the last four digits of each number are there. This is not stripping the leading zeros; it's stripping whatever numbers are before the last four. How do I do this? Thanks =MOD(A1,10000) Format Custom as 0000 -- Kind regards, Niek Otten Microsoft MVP - Excel "Betsy" <Betsy@discussions.microsoft.com> wrote in message news:CE72B30D-E9B3-427A-A259-8FAC31651539@microsoft.com... |I wish to format a column of numbers so that only the last four digits of | each number are there. This is not stripping the leading zeros; i...