I have a source spreadsheet with a bunch of percentages as numbers, like this:
When I paste that into my end spreadsheet with its cell formatted as percentage, I get this:
Which I understand why... I have been searching and all I can find to do is past special with the multiply operation (from a blank cell that contains .01) and then it converts them to the correct result, then I reformat the column as a percentage.
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:...
I would like to do the following: * Format numeric cells (cells with a percent sign) to zero decimal places. I have a set of macros that I am combining to clean up a data set and these are two of many (removing blank lines, duplicates, blue/bold, etc.)
I had created a pivot table and pivot chart for the data, the pivot table shows the row label's as percentages which is correct, but it when comes to the pivot chart it shows it as decimal, for example a 10% shows 0.1, I tried of formatting the x axis and choose percentages but it doesn't want to change.
I have a column of cells with values - 0.2%, 0.32%, 0.22, 0.5 etc. The cells with % symbol are in ' Percentage, 2 decimal' format while the plain numbers are in 'General' format i.e. column contains cells in either of these formats. I need a macro where I can specify the column and it will select the cells with the % format, convert it to 'General' and multiply the result by 100 eg. 0.2% converted to 'General' becomes 0.002. When multiplied by 100, result is 0.2 i.e. is displayed without the % symbol.
The data comes from the divison of two stock prices that are updating in realtime..... hence i will get a figure of lets say 2.5563. I have it set so that the cell auto rounds to the nearest number even though the formula bar displays the above figure.
My problem arises when I cut and paste this data into a new cell, the decimal figures are still there. I have to have this figure pasted as 3...... not 2.5563 and rounded up to 3.
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:
I have a workbook that I've built for a project. I've attached a sample workbook. What I'm trying to do, for the entire sheet or workbook if possible, is turn any Cell with a percentage of 30% to 49% yellow and any cell with a percentage of 50% or more Red. I would also like to move the ID's of the variable cells, for example Id number 9922, to the cells beside the description of the rows, Affected would be an example, if the information contained in the same row as the ID meets with a set of variables.
For example I only want the ID's moved if they correspond with IDsub 1-25. One more thing, the people who will be using this spreadsheet will be copying data from a website when it is imported it does not insert the values as numbers. I would like to format the cells, in example workbook they would be any of the cells labeled ID IDsub Variable or Number, so that anything put in that cell will automatically be converted to a number.
I should also probably add that the formatting will be done on approximately 80 rows a sheet with 47 sheets.
How would you prevent the copy/paste of cells that have comments?
Also, how would you allow cells with comments to be copied and pasted without pasting the comments?
I also have an aside question about the forum advanced search. When searching for multiple search words, how would you type the search to include all words, for example, "prevent" & "paste" & "comments".
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.
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,
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
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.