In the attached sample (with macros enabled), you will find the problem when pressing the button “INDTAST DATA” (I apologize for the linguistic challenge, but the XL-sheets are in Danish… To relief – check the crash course in Danish below) and then entering some number in the two last textboxes (called “Forventet ændring i antal timer I næste kvartal (%)” and “Forventet ændring i omsætning i næste kvartal (%)”)… If you enter something there, the result will be multiplied by 100 in the worksheet.
I would like to be able to simply enter a full number – like 12 or 9,5– which will then be entered into the worksheet as 12% or 9,5% (and not 1200% or 950%)… I think the answer lies in inserting some code in the VBA code, when the macro writes the data to the worksheet, but you guys know more about it than I do...
I can, of course, enter a full number in the textboxes – followed by a %-sign, but that will slow down the process significantly as well as increase the risk of errors…
Virksomhed = Company
Kvartal = Quarter
År = Year
Branche = Industry
Fakturerede timer = Billed hours
Faktureret omsætning = Billed revenue
Timeforventning = Expected hours (next quarter)
Omsætningsforventning = Expected revenue (next quarter)
Indtast data = Enter data
I have built a spreadsheet that pulls data into B60:AA240 (Sheet name is "Actual Numbers Report") from a different sheet in the same workbook. Some of the data is in Number format and the other is in Percent Format. What I would like to do is if AL10 in the Actual Numbers Report sheet says "Actual Numbers" then I would like the cells in B60:AA240 convert to a number format "000,000,000" If AL10 says "Trends" then I want it to convert the cells in B60:AA240 to a percent format "0.0%". I tried creating some code, but it doesn't seem to work.
Private Sub Convert_Percent() If Not Intersect(Target, Range("B60:AA240")) Is Nothing Then If .Range("AL9") = "Actual Numbers" Then Range("B60:AA240").Select Selection.NumberFormat = "000,000,000" ElseIf .Range("AL9") = "Trends" Then Range("B60:AA240").Select Selection.NumberFormat = "0.0%" End If End If
End Sub
If this can work then the 2nd question I would have is can this same line of thinking work to format the chart that this data is pulled from? So if it is Actual Numbers the chart would be in a number format and if it is Trends then it will change to a percent format?
I have a percent 3.14%, that I want to show 15, 20 and 25% above and below that percent. I am showing below the results and then formula. The top calculation results in the same on both the left and right. However the -15,-20, -25% results are different. Which is correct.
3.14%
20% +/- 3.14%
0.63% or 6.28%
1.57%
2.51%
[code].....
basic math, but I don't understand why the results are different.
I have a problem that when I try to convert text to number and format the number without 2 decimal places as seen on the link I have given below, Instead of 1607.947, I get 1607947. I have Excel 2010 loaded. The details are in below picture.
i have this function that poulates data from a userform into a sheet.
For lLoop = 1 To MAWBNoVar With Range("B" & Rows.Count).End(xlUp) .Offset(1, 0) = Controls("txtMAWB" & lLoop) .Offset(1, 1) = Left(Controls("cbDestination" & lLoop), 3) .Offset(1, 2) = Controls("txtGW" & lLoop) .Offset(1, 3) = Controls("txtCBM" & lLoop) .Offset(1, 4) = "= ROUND(E" & Y & "*167,0)" .Offset(1, 5) = "=IF(D" & Y & ">F" & Y & ",D" & Y & ",F" & Y & ")" .Offset(1, 6) = "=IF(F" & Y & ">D" & Y & ",G" & Y & "-D" & Y & ",G" & Y & "-F" & Y & ")" Y = Y + 1 End With Next lLoop
My problem is that the data being entered into the sheet for the lines highlighted in red is going in as text, and not true numerics, so that the subsequent formulae are not working correctly.
I know how to do this in a worksheet: =(b1-a1)*1440. B1 being the end time and A1 being the start time. I have a userform where the start time and end time are entered in text boxes. txtstart1 and txtend1. I would like the result to show up in txtmin1. Here is my code that doesnt work. I tried to convert code from a non-time sheet of mine. Dim as Integer may be the problem, I just learn as I go, and so far have only dealt with Integers.
I have a spreadsheet that determines what percent increase over a previous quarter. The values can be negative or positive; however, I have one entry that I'm trying to divide zero by a number which results in the #DIV/0! error message. I rather have it say -1000% since that is the value I'm looking for. I now how to deal with a simple division by using an IF statement such as IF(B1,A1/B1,0), but this one is throwing me a curve.
The attached spread sheet is a quarterly percent increase over the last one. In the example, N00377 represents a machine in cell D14 and D17, where cell D17 is the last quarter, and I'm comparing it to cell D14 which should show an increase or decrease in cell F.
I'm just trying to get a total of columns E, F and G, and place those totals in row 5. The problem is that somehow the numbers in column G were stored as text, so the SUM formula is coming up "0". How would I format these cells, in a macro, (columns E, F and G, just in case the data in the other two columns were stored as text), as a number so that I can total them.
I've tried selecting the column, selecting format cells and choosing number, but that doesn't work. I can manually select the cells, click the little exclamation point, and then tell it to convert to number. This works, but when I tried to record it to add it to the macro, it didn't record anything but the selection of the cells.
I have a string of imported data which comes into an existing spreadsheet. It cannot be changed prior to importing as the data is provided by an external vendor.
When the data is imported into my spreadsheet the Error Checking tag comes on, after I select the cells where certain numeric data has been entered, stating that this is a range of Numbers Stored as Text. If I click on the Error Checking tag and select the Convert to Number option and then enter my VLOOKUP function I get the desired answer. If I do not convert the text to numbers then my VLOOKUP function does not work at all. The cell just displays the function text itself instead of the desired answer.
Here is what I am requesting:
Assistance with writing the VBA code to accomplish the manual task of converting the text to numbers. I have tried to format using the Ribbon without success.
when i import some data from web some of the character show ¾ or 1½ ..these look like a word rather than number so may i know how can i convert "1½" to 1.5?
I have a set of data that is meant to distribute a certain number of items to different groups.
I have 10 groups, some will get more than others depending on previous usage. The problem is that I need the percentages to be in whole numbers and the total percentage needs to be 100%. I tried rounding but it doesn't work. Here is an example from one item's line.
I want to find the percent of increase over last year. If last year was 100 and this year is 500 then the percent would be 500%. However things get tricky if last year was -100 and this year is 500 or if last year was 100 and this year is -500 then it get's screwy and I'm not sure what formula to use to handle any situation.
Rate Hours =basePay plus 6% plus 7.1% total $50.00 10 $500.00 $530.00 $567.63 $567.63
What i want to have is one cell that I can Total everything. I want my spread sheet to display just rate, hours total I am having troule making the formula to display everything in the total cell
Somehow I seem to think I need to use the Value of C1 ( which is required btw) to get a percent in D1, but not sure how it would go in one complete formula in D1
I have a combobox embedded into an excel sheet with a linked cell and a range defined in the combobox properties. Every time I change the value in the combobox, the value in the linked cell is stored as text instead of a number.
I have tried copying a cell containing 1 and copying and pasting as special into the linked cell but that only fixes it for the time being. If I change the value in the combobox again, the value in the linked cell is again stored as text. I tried =value() in the linked cell but that again only worked temporarily. Every time I change the value in the combobox, the value in the linked cell is stored as text.
I am trying to convert the name of a month to a number but there is a slight issue with using my normal method of TEXT("1/"&A1&"/2013","mmm")
I am trying to create a dynamic table which if you change 1 value for the month, it changes others
so my data looks like so,
Jan Feb Mar Apr May <---- this is the value which is chosen
The problem is when I select the month "January", it assigns the value of the above cell as 1/0/2013 which is not a date when in fact I want to set it as "December".
Here how to convert Number to Text..Like 100 means One Hundred.For this any formula is there? i want to change Full A Column numbers to Text..Number To Text.jpg
I'm trying to write a macro that will convert a number into text but can't hone in on the right coding
here's what I want to do:
a.) I select a cell in my spreadsheet that contains a number, it can be in any format ie: 100, 7.7442, 22.3 b.) I launch the macro c.) the macro converts the number into text and adds the letter T in the front so the new cell value becomes: T100, T7.7442, T22.3