Return Decimal Portion Of Number
trunc gives just the numbers before the decimal point. how do i get the numbers after the point. original number minus trunc seems messy!
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Paste Two Decimal Number In Excel Without Extra Decimal Places Appearing
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:...
View Replies!
View Related
Return Nth Value To Right Of Decimal Point
Would like to do the following for our school, In cell A1 there is a number, for instance: 12.12345 Based on that number, the 3rd number after the decimal is important. If the 3rd number after the decimal is “x” then the contents returned in b2 is a text value ( like high school ) .........
View Replies!
View Related
Function To Subtract 2 Decimal Times & Return A True Time
I have created a userdefined function. the Idea is for the user to calculate the difference in hours and minutes. The input would be like budtime = 30 , realtime = 1.25 the answer I would like to have is 28:45 (28hours and 45 mins). Im aware that I can format the cell manually with [h]:mm but I'd like the function to do it. I have written this: Function RT(BudTime, RealTime) RT = Format(((CDec(BudTime)  CDec(RealTime) / 24)), "[h]:mm") End Function
View Replies!
View Related
Change Decimal Number To Whole Number
I know the basics of excell, but haven't ever written any formulas or macros (if that's what I need?) that would perform the following opperations. Bare with me, it's a three step process. 1. I need any zero's to the right of the last number (19) to be removed. (I think this can be done with the click of a button, somewhere?) examples: a. 173.17300 = 173.173 b. 231.11000 = 231.11 c. 53.00000 = 53. 2. I also need for the decimal to be moved to the right of the last number after the zeroes have been removed from the previous step. (This seems to be the most deficult step, but most important for me.) examples: a. 173.173 = 173173 b. 231.11 = 23111 c. 53. = 53 3. I then need to be able to cross reference those remaining numbers with a set of numbers I have. examples: Remaining Numbers / My List a. 173173 / Not on list b. 23111 / MATCH c. 53 / Not on list
View Replies!
View Related
Round Off Decimal Number To Whole Number
i want to do something that should be relatively simple, and yet it is not... has me stumped. what i'm doing: taking a range of numbers... from 119, 2039, and so on, and using a vlookup function to pin a rating for said value off a reference table. heres a example of what i'm doing: A  B 1 1 2 1 3 1 4 1 5 1 ... ... 19 1 20 2 ... ... 40 3...................
View Replies!
View Related
Whole Number As Decimal
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?
View Replies!
View Related
Convert Number To Decimal
I need a formula to take the numbers listed in cells D4:D50 If below 1,000,000 than just keep that number value EXAMPLE DATA If the Ten Thousands place is 5 or below leave the same if it is higher round up. (use this concept for ALL PLACE VALUES 1,500,000 to 1.5 million (if the rest are zeros) 4,000,000 to 4 million 1,564,535 than to 1.57 million 1,545,535 than to 1.54 million 1,555,000 than to 1.55 million Same concept for the rest as the Millions (move the rounded place up as needed) So for Billions it would be 10 Millions place (to round form) I think lol 1,000,000,000 to 1 Billion 1,500,000,000 to 1.5 Billion 1,560,000,000 to 1.57 Billion 1,578,000,000 to 1.58 Billion 1,700,000,000 to 1.7 Billion I would like this to continue all the way up to place value 999 QUADILLION! (if possible) if the value can go bigger that would be great!
View Replies!
View Related
Seperate Decimal & Whole Number
How do I seperate 1.2 and 1.02 miutes from the same column into Minutes and Seconds Correctly. How do I get the first to seperate as (1) Min (20) Secs and the next to seperate to (1) Min (2) Secs I have 200,000 line of data in one column with times from .o1 mins to 1498.40 mins that I am doing this to. I need to convert it all back to seconds.
View Replies!
View Related
Number Of Decimal Months Between 2 Dates
I'm using the Calendar Control to determine 2 dates. 1 Starting Date and 1 Ending Date. I'm trying to determine the total number of months between those two dates down to 2 Decimal Places. I also need to get the total number of weeks and days but those are much easier and I've been able to work those out by the following: VB: AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when copy/pasting, but IS if the keyword uses "quotes" ........
View Replies!
View Related
Covert Decimal Number To Minutes
I would like to convert a number to minutes. For example .48 or 48 as a formula result to 48 minutes. The reason for doing this is I will add the result to a time. Forumula result = 48 > convert to {48 minutes + 12:00 = 12:48} I've tried using just formating but no luck.
View Replies!
View Related
Check If The Number Have Two Decimal Point
a1 > 2.333.33 "i want this to return as 2,333.33" a2 > 33.33 "i want this to retun 33.33" a3 > 45.555.55 "i want this to return 45,555.55" i already asked this question and someone gave me this code > substitute(a1,".","",1) which return to 2333.33 but the problem is for the a2 if i use the code it will return as "3333" which read as "3,333". Is there any way that we can determine if the values have two decimal point before it will run the command?
View Replies!
View Related
Round Up/Down Based On Decimal Number
I receive a list of numbers that are rounded to three decimal places. I need to round them to two decimals  here's the catch  if the third decimal is a 9, it needs to go up, otherwise, 18 need to round down. Example 3.678 goes to 3.67 3.679 goes to 3.68 If the third decimal is <=8, it needs to go down.
View Replies!
View Related
Make Any Number Begin With Decimal Point
I have a column that has values ranging anywhere from 1 to 999,999 and I need a way in vba to take whatever value is in the specified cell and place a decimal point at the far left. Example: change 175526.34 to .17552634 change 376.1 to .3761 change 22987.254 to .22978254 when the code is run I need the selected number to begin with the decimal point. See, the tricky part is that the length of the number varies and I cant just divide by X to shift so many places to the left..
View Replies!
View Related
Number Format: Change Decimal To Comma
Is there any way to change the decimal point from the usual period symbol (.) to a comma (,). The reason being, i have a structural design spreadsheet and the new terminology is just so, changed from 00.00 to 00,00 I have tried cell formatting but it just uses a comma (,) for numbers in their thousand and it wont do what i need.
View Replies!
View Related
Rounding Number In Formula To Remove Decimal
My formula is not rounding properly. Cells I4, J4 and K4 all filter from the results of cell I3 divided by 3. (e.g. 10/3 = 3.333) I was able to remove the decimals in cells I1:K3, but the between formulas (I4:K4) keeps adding the decimal back, therefore this results in errors to my chart.
View Replies!
View Related
Number Showing Extra Decimal Places In Formula Bar
If you look at the attached file in Column E line 47 you will see that it displays 373.97. However if you look in the formula bar it shows 373.9694. I am trying to make it so that the formula bar shows the same number as in the cell. Any idea on how to do this? I have tried everything I know how to do, which is not much.
View Replies!
View Related
Stop Hexadecimal Number Displaying As Exponential & Convert To Decimal
I use hex2dec frequently and input with a hex 'E' such as 05e8 is misinterpreted as exponential notation. I can use =hex2dec("05e8") to get the correct value, but when the hex number is in another cell, I get the exponent assumption/ conversion (to 5 x 10e8), or a # NUM error if it is in quotes. This seems like a blatant problem but I've found no mention of it in searches or FAQs.
View Replies!
View Related
Convert Or Format Decimal To X Digits Without Decimal Point
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: =IF(ISBLANK(B4),"",IF(LEFT(C4,1)="w",(B4&""&TEXT(F4,"YYMMDD")&C4&TEXT(G4,"HHMM")),(B4&""&TEXT(F4,"YYMMDD")&C4&LEFT(TEXT(H4,"00"),2)&RIGHT(TEXT(H4,"00"),2)))) 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.
View Replies!
View Related
Insert Number In Cell To Return A Set Number
I need this for a tracking sheet of scores. For example, 1 gets 100 points, 2 gets 90 points, 3 gets 80 points, etc. I need to set it up for 10 places. I have no idea and have fiddled with it for two hours now. I need to be able to put a 1 in the cell and 100 appears after I hit enter, etc.
View Replies!
View Related
Lookup For A Portion Of A Text Value
I want to lookup a text value in an array (vlookup). However, instead of searching for the exact value I want to search for only the exact match of the first four characters of the text value. Example If I have in Cell A1 the text value: 5154 In cell B1 I want to lookup 5154 in the values cells C1 to C6 614a215g 515476 29421cg 215a786 914215g 2154a6 The result would be 515476 I tried with this: =VLOOKUP(A1,LEFT(Table4,4),1)
View Replies!
View Related
Sum Portion Of Array Without Loop
I faced a problem to attach this small WB as an XLS I'm looking for some way to some the red cells without looping. In this example the array was filled with A1:A10 values. In the real situation the array gets its values from other source than a Worksheet Range. As you can see I manged to transport the Array Values to F1:F10 and from here I could calculate the sum of F3:F8 but I do not want to use any helper columns.
View Replies!
View Related
Protect Portion Of Sheet
I find the protection options of Excel confusing. I have a pivot table. Alonside it our a few formula columns. I want to protect only the columns outside the pivot but can not get it to work. I tried this: 1) Highlight entire sheet 2) Format Cells Protection  remove checkmark from: Lock Cells 3) Highlight 4 rows outside pivot 4) Format Cells Protection  place checkmark in Lock Cells 5) Tools Protection Sheet  supply password The result is that the 4 columns outside the pivot are indeed locked BUT SO IS THE PIVOT...ie you can not utlize the dropdowns! It must have something to do with the pivot, on a regular sheet (no pivot) it works fine. Further if, while Protecting the sheet, I click the: allow Pivot table reporting box, then it allows dropdown usage but blows up as soon as you select something with an error about not being able to redisplay selected itemsbecause of protection being on....
View Replies!
View Related
Extract Portion Of Address
I have read Dave Hawley's reply to a member using LEFT and MID but I can't seem to make what I want, to work. I have an address in the follwing format: 12 MAICH ROAD, MANUREWA CENTRAL, MANUKAU CITY I need to extract the '12' to be placed in one cell, and the 'MAICH ROAD' in another cell. Unfortunately not every address has a street number and is sometimes listed as follows: LEYTON WAY, MANUKAU CENTRAL, MANUKAU CITY I still need to be able to put the 'LEYTON WAY' portion into the same column as the 'MAICH ROAD' in the previous example.
View Replies!
View Related
Convert Number To Time & Decimal Time
I need to separate a list of times from a telecommunications bill. I have 170,000 line of data. The Times are represented as below. eg 46 46 Sec 59 59 Sec 100 1 Min 159 1 min 59 sec 200 2 mins 502 5 mins 2 sec 1256 12 mins 56 sec 3456 34 min 56 sec. How do I separate them to a decimalized per min value.
View Replies!
View Related
Extracting Portion Of Text From Cell
I have made something similar before and we were able to make it work... I tried the same code, but it is not working now. Basically in cell a1 I have Auction Type: Auction, Auction End Time: 11/15/2006 10:00:00 AM(MST), Asking Price/Current Bid: $10.00, Number of Bids: 0, Description: , Traffic: 28 and in cell b1 I need it to only display $10.00 in cell c1 I need 0 (for number of bids)
View Replies!
View Related
Extract A Portion Of A Text String
I have a text strings that contains the word "CHQ 123456" or some other CHQ number. There might be another word/words after the word CHQ xxxxxx something like: Payment by CHQ 123456 against your inv 45225 ABCD Company Limited  CHQ 187546 PO 4520061257/CHQ 745865/invoice Number 4125 I need a UDF that extracts the CHQ No. from the text string Eg: CHQ 123456 CHQ 187546 CHQ 745865
View Replies!
View Related
Copy Portion Of Filtered List
I need the VB code to copy just a portion of a filtered list. I have completed the code to sort and filter the list. I'm having a problem determining how to define the region needed. I have searched the forums and found a few helpful threads but nothing specific. Most show selecting all the columns of the filtered list. My list is in columns A:AA and begins in row 4 (header row). In my test data, there are 5,900+ records and filtered list is approximately 4,900 records. Since I have sorted the data, the portion of the filtered data I need will always begin in cell D5, be columns D:K, and be the visible rows.
View Replies!
View Related
Highlight Portion Of Text Of TextBox
The following code highlights part of the time (hours or minutes) that will be modified by a spin button. The code works fine (although maybe a more efficient way). Each time you click in the time it will highlight the hours or the minutes, depending on where you click. When you click on the spin button the control loses the focus so becomes unhighlighted. I thought that just setting the focus back to the text box would work but what I am getting now is it highlights on every other click of the spin button. Private Sub spnTime_Change() Dim dtTime As Date Dim y As Integer If strTimeChange = "" Then MsgBox "Please click on a time to modify it" Exit Sub End If dtTime = Format(ctlText, "hh:mm") y = Me.spnTime.Value...............
View Replies!
View Related
CountBlanks Error :: Hiding Rows Portion
I pieced together this code last night but I cannot seem to get the hide row function to work correctly. Any ideas on how I can correct the hiding rows portion? I just want the code to hide the entire row if columns K:Z are all blank. So I assumed I can make the CountBlanks=16, then hide that row if its true! Thanks to Sixth Sense and Norrie for that idea! Code: ....
View Replies!
View Related
Color Format A Portion Of Text Within A Cell
I have a column of data that contain miscellaneous comments in each of the cells in column 'A'. This is a sample of the text in one of those cells: The quick brown fox jumps over the lazy dog. Is there a way to programmaticly search each cell in col 'A' to look for any occurrence of the string 'fox jumps over' and highlite in RED only that string occurrence? So in the end the above cell would now be: The quick brown fox jumps over the lazy dog.
View Replies!
View Related
Append Numeric Portion Of String To Variable
How would I be able to assign a number portion of a variable string to another string variable. For example I have the following string: AOSXLS_356NewInfo I just want the 356 assigned to a string variable. only the first 7 characters won't change. The number part could be 2 or 4 digits, and the NewInfo portion could be anything.
View Replies!
View Related
Retrurn Date Portion Of File/Workbook Name To Cell
I am using Windows XP and Excel 2003. The filename I want to open is called "MMO Activity Report 250906.xls". Part of the filename as "MMO Activity Report" will never change but "ddmmyy" will change constantly. I want it to show in active worksheet cell A1 in format YYYY.MM.DD ie. 2006.09.25. I type in Sheet1, cell A1 as "=filedate()" but it shows me "#VALUE!" Function filedate() Application.Volatile Filename = Mid(Right( ActiveWorkbook.Name, 21), 1, 9) filedate = Format(DateValue(Mid(Filename, 1, 2) & "1" & Mid(Filename, 4, 2) & "1" & Mid(Filename, 7, 2)), "yyyy.mm.dd") End Function
View Replies!
View Related
Find A PORTION Of Text In A D Column And Automatically Adds The Price To The Right Of It Together In One Cell
I am trying to organize it in a way that I can have all my purchases added based on my text criteria of certain purchase... Ill try to be as clear as possible. I have already organized it in a way that when I paste new months statement in my Excel file it sorts it by date, newest on the top, and I made Conditional Formatting by color on column D which states the Description of purchase. Starbucks appears in description cell but it is followed by number and location making each Starbucks cell in column D different in name. So its hard to use Exact phrase formula to combine the amount for that purchase. My question is: Is there a formula that find a PORTION of text in a D column and automatically adds the price to the right of it together in one cell. There is a formula that looks for the whole text in the cell but that doesn't work when my name has always some extra numbers at the end of the word Starbucks
View Replies!
View Related
Return Row Number With Largest Value
I've a column that contains numerical values. In my vba code, I have to select a block of cells at a time and get the row which has the maximum value. One lame approach I am doing is wasting another column that extracts the max from the block of cells using Excel's Max function, and then doing a iterative search in the numerical column to get the cell tht contains the max value, and from it get the row number Is there a better way such tht i can avoid the looping? so in a nutshell, i want to get the row number from a range of cells that contains the maximum value
View Replies!
View Related
