Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Excel formula help

Thread Tools
 
Search this Thread
 
Old 12 October 2008, 03:21 PM
  #1  
druddle
Scooby Regular
Thread Starter
 
druddle's Avatar
 
Join Date: Mar 2001
Location: Berkshire
Posts: 5,528
Likes: 0
Received 0 Likes on 0 Posts
Default Excel formula help

Hello

I am using Excel and I want to be able to take an amount of months (say, 46) and use Excel to calculate the amount of years and months that is (3 years 10 months), not how many years as a decimal (3.85).

Does anyone know how to do this ?

Dave
Old 12 October 2008, 06:22 PM
  #2  
warrenm2
Scooby Regular
 
warrenm2's Avatar
 
Join Date: Aug 2003
Location: Epsom
Posts: 5,832
Likes: 0
Received 0 Likes on 0 Posts
Default

(no.of months)mod 12 for months, (no.of months)div 12 for years
Old 12 October 2008, 06:27 PM
  #3  
LostUser
Scooby Regular
 
LostUser's Avatar
 
Join Date: Oct 2005
Posts: 476
Likes: 0
Received 0 Likes on 0 Posts
Default

If you use A1 for the value you want to convert (e.g 46)

Use

=MOD(A1,12)

to return the number of months and

= INT(A1/12)

to return the number of years.
Old 12 October 2008, 06:52 PM
  #4  
ash002004
Scooby Regular
iTrader: (1)
 
ash002004's Avatar
 
Join Date: Jun 2008
Location: Northants, Wellingborough
Posts: 1,988
Likes: 0
Received 0 Likes on 0 Posts
Default

Don't you just need to highlight the cells and choose the settings to show what value/units you want to view it all in? or u asking how to work the whole formula
Old 12 October 2008, 10:37 PM
  #5  
druddle
Scooby Regular
Thread Starter
 
druddle's Avatar
 
Join Date: Mar 2001
Location: Berkshire
Posts: 5,528
Likes: 0
Received 0 Likes on 0 Posts
Default

Thanks chaps. I have 46 in B1. In B2 i have =INT(B1/12) and that gives me 3. If I out =MOD(B1/12) in D2 I get an error saying "Youve entered too few arguments for this function).

All I want is B2 to show the years and D2 to show the months, so B2 says "3", C2 says "years", D2 says "10" and E2 says "months". I can input C2 and E2 in text but how do I get the rest to work ?

Dave
Old 13 October 2008, 12:05 AM
  #6  
LostUser
Scooby Regular
 
LostUser's Avatar
 
Join Date: Oct 2005
Posts: 476
Likes: 0
Received 0 Likes on 0 Posts
Default

That's cos you're putting =MOD(B1/12)

It should be =MOD(B1,12)
Old 13 October 2008, 12:08 PM
  #7  
markr1963
Scooby Regular
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
Default

Or you could be proper smart ar$e and output the lot in 1 cell taking into account 1 year, 1 month and no months

=IF(INT(B1/12)=1, INT(B1/12) & " year ",INT(B1/12) & " years ") & IF(MOD(B1,12)=0,"", IF(MOD(B1,12)=1, "and " & MOD(B1,12) & " month","and " & MOD(B1,12) & " months"))
Old 13 October 2008, 01:21 PM
  #8  
druddle
Scooby Regular
Thread Starter
 
druddle's Avatar
 
Join Date: Mar 2001
Location: Berkshire
Posts: 5,528
Likes: 0
Received 0 Likes on 0 Posts
Default

Job done. Thanks alot.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
leg200
Subaru Parts
5
07 October 2015 07:31 AM
Ganz1983
Subaru
5
02 October 2015 09:22 AM



Quick Reply: Excel formula help



All times are GMT +1. The time now is 05:12 AM.