I know that if I enter =3/4 in a cell it will give me .75 but is there is formula to convert fractions into decimals or is this the best way to do it? I was also wondering if there is some way to convert the decimal amount to a fraction

for measurement conversions I know that =B3*25.4 will convert a decimal to mm and so will the formula =CONVERT(E4,"in","mm")

and to convert mm to a decimal a few formula that work are =CONVERT(H3,"mm","in") =MROUND(H4/25.4, 1/8) =H5/25.4 =INT(H6/25.39999918*8)/8

But is there a way to convert a fraction to the decimal and is there a way to convert mm to a fraction instead of the decimal equivalent of the fraction? or maybe a formula to convert mm to inches but instead of the result being in decimal format it would be in fraction format?

I am working on a simple calculater, what I want to do is figure sq. inches my problem is every thing I try the decimals won't calculate right,, this is a example of what I want to do

Inmates can apply for pre-release when they have half their minimum sentence served. For example 2 years 6 months. They would have to serve 1 year 3 months.

I use this formula

=DATE(YEAR(A1)-A5,MONTH(A1)-B5,DAY(A1)-B6)

Where A1 is half the years, B5 is half the months, and B6 is half the days. The problem is when an inmate is sentenced to a minimum of 3 years and 3 months. The latter formula will not calculate 1.5 years or 1.5 months. It rounds up. What I would like to do is covert the 1.5 years to months and the 1.5 months to days.

I am trying to create a unique sample code by putting together the values of other cells that a user will input. It's all working well apart from the last part, where I am trying to include a decimal number. I want the decimal number to appear without the central "." and in a four digit format. e.g. 2.5 would appear as 0250, 14.25 would appear as 1425. This is the formlua I am using currently:

However, where the value of H4 is 2.5, I am getting a result of 0303 (I've put this part in bold). I have attached a small spreadsheet to aid understanding.

I created a UserForm then linked ComboBox1 to range A2:A, TextBox2 to range E2:E, and ComboBox3 to range M2:M of the same worksheet, named Sheet3. The row contents in Column A, Column E, and Column M are associated. Therefore, when the UserForm is active I want to be able to select a row from Column A in ComboBox1 and have the UserForm pull the contents from the same row of Column E into TextBox2, and Column M into ComboBox3. Here is what I have so far, but its not quite doing it.

Code: Private Sub UserForm_Initialize() Sheets("Sheet3").Activate Dim ColARange As Range

i try to convert several decimal values into Days Hours:Minutes:Seconds my problem is the following. If i user the format DD hh:mm:ss values over 32 will start counting the days from 0 (like a new month). and if i format it like M D h:m:s values < 32 days gets displayed with a 1 (for the month) before the days.

[Code] ......

is there a way to get only the count of days displayed without the summarization to months?

I'm trying to find out how many 40 hour shifts we had in a week by dividing the total seconds staffed (2989957) by total seconds in a week (144000) to get a 2 digit decimal result. I have a field formatted as [s] that I need to convert to decimal but when I do a calculation using that field it comes out as [s}.

Cell A1: 2989957 formatted as [s] Cell B2: =A1/144000 formatted as number with 2 decimals Result shows 0.00

If I use that calculation in a cell with a general format, I get 21 and it reverts to [s] format.

I have set up a form which requires one textbox to have a decimal followed by four numbers (ex .5780) and another which requires two numbers, a decimal, then two more numbers (ex 57.80). how this can be accomplished? I am new to Visual Basic coding!

I have a combo box where the selected abbreviation will affect the number of decimal places in another cell where figures are manually entered. The decimal places will range from 0 to 5.

The combobox contains abbreviations of product codes i.e TM, FGGT, etc up to 40+ & the range of value can vary from 4 digits to possibly 10.

So what I am looking for is if I select TM another four columns require digits to be manually input with 2 decimal places, however, if I select FGGT the same columns in a different row will need to be 4 decimal places as per the product code selection from the combobox.

I need to convert the fraction at the beginning of a cells text into the decimal equivelent. for example 1/4-20 3A would give .2500. I have this formula so far that works perfect for fractions that only contain 1 number on each side of the division sign such as 1/2.

Is there a method to automatically convert a decimal to a percentage?

For example:

if given the value of 76.48, is it possible to automatically convert this to 76.48%? Formatting the cell as a percentage produces 7648%. I've tried everything I know and can't get the right result.

I was reading this Binary Conversion from Decimal on this site, however i am unable to reply to the thread. This code is exactly what i was looking for but have the need for it to be able to give the result as a number of bits eg. i would like the result to be dispalyed as 13 bits. I have tried modifying the code without any success and would like to be able to use it in this form. Public Function Dec2Base( Num As Long, base As Long, length as long) As String

In TextBox3, the user will input a percentage as a whole number, IE: 5 for 5%, but when the update is made, it is writing the "5" as 500% and is writing 50 as 5000%.

If there is already a percent in the cell it calls up IE: 50%, it shows up in TextBox3 as .5%

I have following for change event in text boxes to only allow numerics e.g.

Private Sub txtGBP10_Change() If (Not IsNumeric(txtGBP10.Value) And (txtGBP10.Value <> "")) Then txtGBP10.Value = Left(txtGBP10.Value, Len(txtGBP10.Value) - 1) End If End Sub Private Sub txtShare10_Change() If (Not IsNumeric(txtShare10.Value) And (txtShare10.Value <> "")) Then txtShare10.Value = Left(txtShare10.Value, Len(txtShare10.Value) - 1) End If End Sub

Can I add some code so that the user can only add numeric entries to 2 DP (txtGBP) or 3DP(txtShare)

I have an UserForm, where I have several text boxes. One of these textboxes should be entered with decimals. I have been able to cope with the declarations, and set the variable as Variant. However, is it possible to prevent the user inserting "," instead of "."? Alternatively, automatically change "," to "."?

firstly I did txt to columns, then I found some data changed to scientific format which is not I wanted as I could not convert it using function HEX2DEC.

The formula is used to calculate a comparative run time at an elevation of 5000 feet. The time the run was in is 11 minutes and 40 seconds. What I need to do is convert the 11.40 into total seconds which would be 700.

Now the actual 11.4 in the forumala is from a cell reference (say D14). It's whatever time the member plugs in (and so is the 5000, this represents the members altitude).

I need the time to stay in a decimal format because I have a huge database that I perform a lookup on to find the point value for it for another calculation seperate from this one. If I were to plug 700 in place of 11.4 my calculated result would be 683.43 which is exactly what I need.

Have a large spreadsheet with time posted in minutes, but is formatted as "general" not time. (ie 8.15 is the entry in general format. Needs to be 8.25 to pay employee correctly). What formula can I use to convert that 8.15 to 8.25 easily?