All Questions
Tagged with number-formatting vba
107
questions
0
votes
0
answers
35
views
Can I Numberformat a date and then change to string to add additional characters to the end?
I have some dates I'm pulling from a database. These dates will go onto a Government report where they want these dates changed to UTC. Then, they want it formatted as "yyyy-mm-ddThh:mm:ss-[UTC ...
0
votes
0
answers
16
views
Unable to Set NumberFormat to "DZD" in VBA for Specific Rows [duplicate]
I am encountering an issue with setting the number format to "DZD" for specific rows in VBA. Here's the relevant part of my code:
For rowNumber = 6 To 15
' Set the currency symbol for ...
0
votes
1
answer
48
views
Concatenate two digit year with number formatted with leading zeros
I am trying to create an invoice number with VBA in excel. I want the invoice number to be displayed "YY####" where the number is formatted with leading zeros and will increase by one with ...
0
votes
1
answer
229
views
Number formatting based on cell value using vba function
I need to create a VBA as a Function, not a Sub, in Excel to format a range of cells based on the cells value. I call the function elsewhere in macro.
If the cell value is greater than or equal to ...
0
votes
1
answer
587
views
Excel VBA function how to detect if numberformat of cell is number
I want to detect whether a cell has the numberformat number. If the cell is not set to numberformat number, then an error message should be logged.
For example:
Cell A1 has the entry 1000. The check ...
2
votes
2
answers
60
views
When Numberformat is set to "MM/YY" the result on german computers is "MM.YY"
I want to create a number format for the x axis in an excel chart.
If I set it manually as "MM/JJ" I get correct dates printed as "04/23".
If I set the numberformat using vba
Dim ...
1
vote
1
answer
368
views
How can I concatenate a bold text, date and time into a specific cell?
Basically, I'm trying to concatenate a specific text (in bold format), the date and time informed in another worksheet into a specific cell.
This code below help me to do that:
Sub Atualizar_Abertura()...
0
votes
2
answers
330
views
How can I format a number in VBA to display as million with 2 decimal places?
I would like to get number display as million with 2 numbers after the comma such as 2.11 m.
My code works to get million only, however when I ask to get deximal, it retrieve the entire number.
Any ...
0
votes
0
answers
384
views
How to set a custom numberformat for an alphanumeric cell value?
I have a spreadsheet where job numbers are stored in the first column. The job numbers always take the format of a number followed by a letter followed by 7 numbers.
I already have validation routines ...
1
vote
1
answer
51
views
Changing number format on a specific sheet
I've searched this forum for a solution, but none of the tips helped me. Perhaps I'm way too novice to put the code together by myself.
I'm trying to set a date format of "dd.mm.yyyy" on the ...
0
votes
1
answer
337
views
Trying to get VBA to show figures in French Canadian Currency
so $4,200.00
should appear as 4,200,00$ (Commas as the decimal point and $ on the right
This Code Generates 4,200.00$ (Almost perfect save for the Decimal)
Columns("C:E").NumberFormat = &...
-2
votes
1
answer
148
views
How to add a leading 0 to column number?
I'm trying to add a leading 0 to a numeric column.
The problem is not all numeric columns are recognized as they are.
Sub AddZero()
Dim MyRange As Object
Dim celle As Range
Dim i As ...
0
votes
1
answer
154
views
Replace number format in Word
I am using a excel vba code to paste some variable data to word document (using replace all function). But I cannot paste it in correct format.
I have a word document template and get some parametric ...
1
vote
1
answer
89
views
Revert a dollars to pounds conversion
My US company has a division in the UK and we occasionally like to see how a proposal will look in pounds versus dollars.
This code switches a specific range in accounting format from USD to GBP.
For ...
-2
votes
1
answer
142
views
How to sanitize 12 digit phone numbers in Excel? [duplicate]
I would like to sanitize the first 6 digits of 12 digit phone numbers in excel. I did use "******" & Right (6) etc if the numbers are in a separate column but the problem is now, I have ...