I need to get a row to convert a number like 6 5 to a /32nd the second digit that will be entered will be the /32nd number like 6 and 5/32. I don't want to have to type 6 5/32. I want to type 6 5 and it will do it for me.
I was trying to decrease the decimal places of the data figures that I'm currently working on my report, however, it keeps rounding-up the decimal numbers. I wish to keep the original numbers and just decrease the decimal places.
For example: The original figure is = 7260.12903225806 Upon decreasing the decimal figures to just 2, the result became = 7260.13
Is it possible for me to just have this result = 7260.12 instead of 7260.13?
I've tried using the TRUNC formula butit does not work if the 2nd decimal value is 0.
For example: The original figure is = 227161.905808985 Upon applying the formula, the result became = 227161.9 instead of 227161.90
I have tried, through control panel - region settings etc, to change the default number of decimals to 0. I often use the Number format using the shortcut CTRL + SHIFT + 1 but then have to reduce the 2 decimals down.
I have recorded a macro to apply this kind of formatting but the disadvantage of this is that I cannot undo any actions before that point - which has gotten me into some trouble on a few occasions .
Is there a macro that I can use that adjusts the "Normal" cell style number format from General to Number (with thousand separator but 0 decimals) each time I open a new book? As merging cell styles is also quite a mundane task..
I am using Excel 2007 and importing a list of coordinates. The coordinates are in a text file and separated by commas, so I'm opening the file as a delimitted file. All of the coordinates import correctly except one. The value is supposed to 52530.6372, but Excel is automatically changing it to 52530.6371999999
If I manually type a "2" to replace the "1999999", it changes it back. If I type "3" it stays as a 3.
I added a round function to force it to round to 4 decimal places and that seemed to work until I then tried using the number with text commands. When I used an ampersand to insert the number into a text string, the additional decimal places are back, even with a round function!
Here's what I'm doing: I'm using a macro to assign a cell value to a variable then set another cell value to the variable instead of copy/paste (because even pasting values only was affecting other formulas in the file for some reason)
The problem: in using the macro, the number being 'copied' is acquiring a few extra decimal places IE 38334.61 is the original number and 38334.609375 is what I end up with. The numbers come from a CSV with only 2 decimal places and I checked by adding decimal places in the format so it's not a formatting/visible digits issue. Since the values are hour meter readings, the extra decimal places end up with very small values outside 0-24 hrs which messes with sorting and usage %. The values are so small all of them together in a month add up to a fraction of a cent but it's one of those things that bugs my OCD by not being right.
My VBA book explains the min/max capabilities, content type, memory bits but not fiddly details like this.
So my question is this: right now I'm declaring the clipboard-substitue variable as an single, is there a different one that would work better without adding anything? Criteria are: numeric, 6 digits before the decimal, 2 after, all positive values. (Ie 123456.12)
I have a vba macro that takes data from one workbook and pastes it into another workbook. In doing this I have declared a few variables of type single (I only need two decimal precision). However, when I copy the values from the cells on the source workbook and paste them into the target workbook, the numbers end up having 12 decimal places. Ultimately, this extra precision causes my totals to be off by .01 or more after a while. I have tried rounding the number as I pull it off the source workbook into the variable, but that didn't matter. How do I solve this problem? Code for pulling data from source workbook:...
Basically, I want to format a group of cells to display 1 decimal figure if the number is not a whole number. If the number is a whole number (or if the rounded first decimal place is 0) I want it to display no decimal.
I need to convert a column of numbers currently formatted with 2 decimal places e.g. 112.12 to 4 decimal places (without the decimal point). I need the end result to be 1121200. I've tried a few different suggestions given on the forum previously but can't seem to retain the 4 decimal places that I require.
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 need a formula to multiply only the decimal number in a cell and not the integer. For example: the number in the cell is 57.3615. I want to multiply .3615 only.
This may have been answered on here but can not seem to find it. My situation is I have values in A1,A2 & A3 that are like counter reading so the value is always changing. What I am looking to do is change the cell color if one of the values is over 500 from the other two values. Say A1 is 3000, A2 is 3250 and A3 is 3500. I would like the cell for A3 to change color.
Moving between different sheets changes the procedure window, which is a good thing, but can also can be error prone and annoying to search through several windows searching for the procedure or module currently working on. Is there a setting somewhere to prevent VBE from changing the current procedure window?
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 need to create a formula in a spreadsheet so that when KWD or BHD is entered into a cell then another cell changes to 8 decimal places if neither of these are in the box then it needs to be 7 decimals! But the box that is changing needs to be alterable.
I have posted this on a non excel specialised forums and i got this answer:
in cell x you have "kwd" in cell y you put: =IF(cell X="kwd",TEXT(cell Z,"#,##0.00000000"),TEXT(CELL z,"#,##0.0000000")) in cell Z you put the value that you want to be alterable
I was going to use the following to test that a number has no more than two decimal places,
Code:
If Int(ActiveCell.Offset(0, 8) * 100) ActiveCell.Offset(0, 8) * 100 Then However it is rather mysteringly failing when activecell = 16.99 or 17.99; on testing it appears that vba is evaluating Int(ActiveCell.Offset(0, 8) * 100) to equal 1698 or 1798
Does anyone know how to convert a 4 digit number to binary in excel? I used the =DEC2BIN formula, but it only works on a 3 digit number that is smaller than 512.
I would like to enter whole numbers but have them convert to decimal. I have searched and found a solution, but it only references to one column and I need to reference other columns as well. I tried to edit but I’m not very knowledgeable with code. Here is an example of what I am looking for, columns E31:E52, F31:F52, L31:L52, M31:M52, N31:N52. Could someone provide a code to acquire these results?
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.
Is there a way to delete only numbers ending in a decimal from a column of numbers? I have a column of numbers but only the non decimals are relevant to the next equation.
C9 is a user entered value, currently formated general C10 is a user entered value, currently formated decimal with one decimal C11 is a user entered percentage, currently formated percent with two decimals C15 is a formula calculation, currently formated general
I've tried formating cells to general (and/or) text and the values appear to be correct but still don't show what I want.
The most popular entries for C9 will be: 123.12 123.123 1.1234 1.12345 Any of the above could have one or more trailing zeros.
I would like C15 to show the same amount of decimal places that the user enters in C9. If user enters one, two, three, four, five, etc...decimal places in C9 then show the same amount of decimal places in C15 after the calculation is done and include any trailing 0's that are needed to match the number of decimals in C9.
I've tried different If statements with custom format to try to get the format of C9 transfered to C15 but haven't come across the right way to do this.
I'm trying to make a shift schedule template, and it's all done except that i cant sum the hours the way I think i should be able to.
I've attached the file for reference.
I've added in some hours for myself as an example. I have 47.5 hours in the week. I've got 3 Rows, In Out and Hours. I've formatted the In and Out the way i want them, but I would like the Hours row formatted as a decimal, so that 7 hours 30 minutes would show up as 7.5.
I'm also having trouble with the totals column at the end. Although D8:J8 total 47.5 hours, it's adding them as 23:30.