Producing Trailing Zero In MsgBox
Nov 23, 2007
I would like to use the following code to produce a message with two numbers in it, both showing an exact golf handicap to one decimal point. If a number is exactly 6 I want it to show as 6.0.
All works well for the number I'm collecting from the user and storing in newh. But I can't retain/produce the trailing zero from oldh which is formatted in the spreadsheet as Custom 0.0.
View 10 Replies
ADVERTISEMENT
Nov 5, 2009
if it possible to produce a letter in excel like you would in word by mail merging.
i dont want to open word as i dont have it on my work pc.
im wondering if it possible to do something like this
dear ( sheet 1 cell 1 )
thank you for your order of ( sheet 1 cell 2 ) we wish to deliver to you on ( sheet 1 cell 3 )
View 9 Replies
View Related
Mar 24, 2014
I know it has something to do with the way I am trying to complete the loop.
I have tried next i, I have tried if's instead of the do until but can't get it to work.
I want it to cycle through the x and if a value is found then paste into the corresponding i row. If the x value is blank then exit the loop.
View 14 Replies
View Related
Feb 22, 2010
I am looking for a macro or a formula that can give me multiple tabs, what i need is jan 01 to april 30,the next 2 books i could do by copying of course i have looked at the macros on here and no nothing about them ....
View 14 Replies
View Related
Oct 1, 2011
I want it to copy and paste whatever the cell is;
Andrew Smith
not
ANDREW SMITH
Code:
Sub Replacing()
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Cursor = xlWait
Application.DisplayStatusBar = True
Application.StatusBar = "Generating DM Pack, please wait!"
[Code] .......
View 7 Replies
View Related
May 5, 2014
I want to make a little chart for easy reference that tells me due dates for projects, based on estimated completion times.
I'm already using NETWORKDAYS to find the amount of working days between today and a due date, but I want to flip the formula around, and I'm having trouble getting the syntax right.
For example, column A reads:
0
1
2
3
5
7
10
15
20
Estimated completion times for various projects.
So I want column B to read the date that this would render. A1, value 0, would always produce today's date for B1. B2 would always read one business day into the future, B3 would read as 2 business days into the future, B4 as 3 business days into the future. Does that make sense, and B5 as 5 bd into future.
View 2 Replies
View Related
Jun 20, 2014
[Code] ......
Trying to get columns 10, 11 & 13 to join so it says "Mr Noddy Bigshoes" (Salutation, Forename & Surname).
View 7 Replies
View Related
Dec 24, 2008
s/s is very large and the need is to transfer formulas from one column to another. Column L contains formulas in cells L7:L45 (attachment) - (L7:L326415 in working s/s). Some of these formulas result in a value being given. I need to transfer formulas only from those cells having values to cells three columns to the left on the same row. I do have code which I was using for another application. This puts a formula in the correct places but it is the wrong formula and I don't know how to amend it so that it carries out the required action. Small attachment enclosed for better understanding of what is involved. Or could anyone change the line ".formula = ......" in the following code to make it work??
View 5 Replies
View Related
Dec 28, 2008
I have a workbook that if I use just the array formula for the totals it works fine and if I use data validation and vlookup and the array formula for the totals it is giving me a #Value! instead. I have tried a couple of things and did find that as long as I do not use the vlookup in the one column (column d) the array formula at the bottom works but as soon as I add the vlookup to column D I got the error.
I want to use the vlookup to get the values for items on a different page - along with the data validation and then use the array formula to get a total for multiple items in the above columns. I have attached a workbook.
View 2 Replies
View Related
Jul 25, 2006
My objective is to create a "guide or cheat sheet" for the correct combination of various tools.
My user has to choose (1) Mother Tool and (2) If the tool is to be used uphole or downhole.
I need the spreadsheet to automatically limit the choices for Combinability that corresponds to uphole or downhole.
After selecting Combinability, the 4th ComboBox must automatically limit the choices specific to subs that fall under the tool chosen under combinability.
I can create a spreadsheet and color-code the combinations however it will be very busy as the list is very long.
I wanted to use ControlBoxes but I can't get it to work - my brain can't seem to connect the dots in VBA.
View 6 Replies
View Related
Feb 10, 2007
I want to define a varible named MonthEnd that I will use in more than one project. In a normal example the variable would look like this:
Dim MonthEnd As String
MonthEnd = Format(Sheet1.Range("C3"), "MMYY")
The problem is that I will be using this more than one time so I figured I could define this a Public constant like
Public Const MontEnd As String = Format(Sheet1.Range("C3"), "MMYY")
View 3 Replies
View Related
Aug 5, 2009
This is kind of an extension to a previously solved post. For a similar problem I used the attatched file (which someone from here so kindly came up with - but to be honest i dont fully understand),
but now im getting onto numbers from 1 to 100 so could get very confusing in the table!
RANDOM TABLE2.xlsx
Basically I want to produced a random number, (which I have managed) then another number, but it cant have any common factors as the first.
So 1st = 10, 2nd = 13 is acceptable
but 1st = 22, 2nd = 12 is not.
I have managed to do it with smaller values by just typing then out, but this is a very long winded technique, but is there a formula that can do this?
View 8 Replies
View Related
Nov 27, 2013
I have a set of data with index numbers and the percentage of their occurrence. I want to use this percentage to weight the occurrence of the index numbers and create a random list of say 500 occurrences.
Index %
1 7.95
2 3.28
3 7.37
4 38.45
5 28.62
6 14.12
View 8 Replies
View Related
Aug 9, 2007
I have created a macro some time ago that is an integrated part of an XLA. The Xla has worked fine but now, for some reason, the macro fails to import the specified text, it doesn't fail but nothing gets imported. I have tried solving this myself, but alas I am not bright enough
The code is:
Sub GetWorksheet()
Dim filetoopen As String
Dim wb As Workbook
filetoopen = Application _
. GetOpenFilename("XL Files (*.xls), *.xls")
On Error Resume Next
View 5 Replies
View Related
Jan 20, 2014
I'm trying to do a simple conditional format where the date is highlighted in red if the difference between that date and Todays date is greater than 90 days.
I've done the formula as =(TODAY()>$B5)>90, which appears to work in the sheet and shows either True or False but when inputting that formula into the conditional format it highlights every single cells.
Are conditional formatting formulas different?
View 5 Replies
View Related
Feb 8, 2010
I need to produce a summary of the monthly spend with parts suppliers for a number of vehicles, with each vehicle having it's own worksheet. The suppliers' names are in column C with the costs in column H.
So what I need to do is sum the results of column H on each worksheet when the supplier's name (which is on the same row) matches "Triple 7" and it's in the same month. The idea is to produce a sheet which displays the total spend each month with our suppliers.
View 9 Replies
View Related
Jul 9, 2009
how to set the format of a cell such that it will automatically add trailing blanks to the data entered into that cell while fixing the number of characters that could be entered into that cell?
View 3 Replies
View Related
Jan 13, 2010
Now I have a decimal column and I would like to remove all of the trailing zeros. It is using the number format. How do I accomplish this?
View 10 Replies
View Related
Sep 18, 2013
I have a column of data in which each cell contains a line of text. Each line of text has spaces after the letters end and there doesn't seem to be a consistent number of trailing spaces.
I can clean up the data using the TRIM function but is it possible to use the TEXT TO COLUMNS functionality?
View 2 Replies
View Related
Dec 29, 2009
I need a macro to do a comparison between two spreadsheets, and one part of it is throwing me, as I need to compare apples to oranges. Here's the situation:
Sheet A has the data noted like this:
PAC
11000
11100
11500, etc.
All data should have 5 digits, and my numbers range from 11000 to 87028, though quite a few are skipped.
Sheet B has data like this:
PAC
110
110-CBS
11000
11100-ING
112
11500-L
How can I change sheet B to:
1) Drop off the dash and anything following?
2) Add trailing zeroes to make sure all numbers are 5 characters in length?
View 3 Replies
View Related
Jul 30, 2008
What the quickest way to get rid of trailing spaces from a column of imported data ?
View 12 Replies
View Related
Oct 12, 2008
I have a set of data with trailing Y in certain cells.
Instead of the replace function in Excel, is there another way of removing the "Y" in that cell and storing it another cell while keeping the numbers before the Y.
i've created another column to determine which cells has Y as the right most character by using =IF(RIGHT(F2,1)="Y","Y","")
So for example, I want to remove the Y from say Cell A2 and store it in say cell A3 while still keeping the value 8624.46 in A2
Cell A2 = 8624.46Y
View 9 Replies
View Related
Sep 24, 2006
I have an excel file with two sheets . One containing the updated prices with its code ( Sheet1) and the other containing the old prices with the same codes (sheet2). Now after several trials to copy the new prices from sheet 1 to sheet 2 with check if the code is same . ( I couldn't )
So how to get rid of the 20 spaces from Sheet1 column A.
View 9 Replies
View Related
Oct 29, 2006
I have written a function which works in the same way as the concatenate formula but where required it uses an underscore to make up the length (14 Characters) of the result. I seem however to have hit a minor snag when users input trailing spaces. I thought I could use trim to eliminate them but it doesnt seem to be working
Function HypCon(CorpAcct, Subdiv)
Dim n, i, iLen, iLen2 As Integer
Dim sCorpAcct, sSubdiv As String
Dim iLen3, iLen4 As Integer
iLen = Len(Trim(CorpAcct))
iLen2 = 7
iLen3 = Len(Trim(Subdiv))
iLen4 = 5..............
View 9 Replies
View Related
Mar 15, 2008
Removing Trailing Commas
I have a list (general ledger) GL codes with trailing commas
Example:
123456789,123456722,123789456,,,,,
When I try to use “replace” and replace the multiple commas with nothing it turns my gl codes into a scientific number (1.23456789123456E+26), but my cell is formatted to text.
The other problem is for numbers with a single trailing comma, it would also remove the commas between the GL codes
Is there a function that removes trailing commas, or commas that are not followed by numbers?
View 9 Replies
View Related
Jan 9, 2014
I'm attempting to create a spreadsheet to calculate various things at my work, however I'm running into a problem that I can't solve. In one cell, I have a formula that returns an value to two significant figures. The number of decimal points that this value has is then used at various points throughout the sheet to truncate/round/etc. However, if the first value has a trailing zero as the second significant figure (ex. 0.20), that trailing zero is dropped. This creates problems since downstream calculations are then truncating to an incorrect number of decimal points. How to retain this trailing zero IF the formula results in one?
View 4 Replies
View Related
Feb 27, 2009
I am trying to create a CSV file to import all of our workers into a payroll software. Unfortunately the list of workers that I have been given to work with has a first and a last name together in one cell. I need to split them into separate cells so the data ends up in the right field in our software. By importing external data and separating the names with the comma as a delimiter, I have ended up with the first name in one cell and the second in another, which is exactly what I need. However, this process also ends up putting a quotation mark in front of the first names in the cells in column A, and a quotation mark after the second name in the cells in column B.
I remember to removing trailing spaces with a macro once, and I am hoping the same theory can be applied to make two macros - one to remove preceding quotation marks, and one to remove trailing quotation marks. The only trouble is, I know no VBA whatsoever, and don't even know how to make a macro unfortunately. Would someone mind letting me know if what I need is possible, and then - literally step by basic step - explain how to make a macro and provide the code to paste into it?
View 2 Replies
View Related
Jun 4, 2009
I have a spreadsheet with numbers of various lengths.
Sometimes they are preceded with a period and have one at the end as well.
Examples: of their present state
.11110000.111111.000000.
111111.1111111.000000.
100000.000000.0000.110001.
Examples: of desired state
10000.111111.000000
111111.1111111.000000
100000.000000.0000.110001
Is their a way I can create a new column and insert a formula, then drag it down so that it will delete the first or last character, if the character is a period?
View 6 Replies
View Related
Oct 21, 2008
I have a sheet that has consecutive dates in column A, from newest to oldest. I column B I have some stock returns. In column C I have some other stock returns. In D1, I want the covariance of the 2 stocks over the past x days (i.e. covar(B1:Bx,C1:Cx)). In D2, I want the covariance over x days as well, but only up to the date in A2 (so, covar(B2:B(x+1),C2:C(x+1))).
I tried this, but it doesnt work:
View 9 Replies
View Related
Dec 10, 2008
I cant seem to figure out how to concatenate data from two cells into one cell and retain trailing zeros. If Cell A1 has ".0000" and cell A2 has ".0005" then I want cell A3 to show:
".0000-.0005".
I get "0-.0005" on my attempts. Alos, how do I make the value an actual number and not a formula?
View 3 Replies
View Related