numberformat

  1. E

    Custom number format

    Can someone give me a pointer as to why my custom number format only shows 1 decimal place? The number format is _-* # ##0,000_-;-* # ##0,000_-;_-* "-"??_-;_-@_- And I ran this snippet on the range to make sure it's all numbers... Sub dlæøphkæl() Dim c As Range For Each c In...
  2. D

    Change Number Format of textbox calculation

    Hello. I am very new to VBA so i have a question. How do i change number format of the value for textbox total cost? i know afterupdate but i tried and it work only on textbox that the user input data in but how do i change the number format of value that is calculated from data input by...
  3. F

    Aligning zeroes and negatives issues

    Hi all, I'm attempting to format a list of totals using the number format of: I honestly am not sure what the heck's going on with Number Formats at the best of times but I'm trying to align the dollars signs and the decimal points. Sometimes the zeroes show and sometimes they don't. And...
  4. W

    VBA - evaluate if a cell is formatted as a date (of *any* date type)

    I have a Task List workbook that launches a calendar app (Userform Control called MonthView) whenever a "date cell" is double-clicked. "Date Cells" are identified by their NumberFormat (mm/dd/yyyy). So the function tests the cell NumberFormat, and if it is "mm/dd/yyyy" then it loads the...
  5. S

    Numberformat with many columns at one go

    Hello I want to numberformat with many columns at one go Can i ws.Columns(3, 5, 9, 11, 23, 27).NumberFormat = Trim(Replace(Format(String(Len(Int(Cell.value)) - 1, "#"), " @@\\,@@\\,@@\\,@@\\,@@\\,@@\\,@@0"), " \,", "")) & ".00" Also Cell.value in red requires proper syntax Will the above...
  6. D

    Unable to set the NumberFormat property of the Range class; Run-time error “1004”

    I have an excel workbook which downloads historical stocks price data. The VBA code has been working without any problems for at least couple of years. Today I get error message: Run-time error “1004” - Unable to set the NumberFormat property of the Range class part of VBA code as it follows...
  7. E

    Type Mismatch using NumberFormat with DataBodyRange

    In the past I've done .Range.NumberFormat no issue, but having a problem using with .DataBodyRange . The following is what I have (with generic labeling): 'Code defining variables, etc with ws.listobjects(1) .DataBodyRange(r,c).NumberFormat = "0" 'Type Mismatch Error occurs end with...
  8. B

    changing date format

    Hey, so i have to change the date format in an excel sheet from yy-mm-dd to dd-mm-yy. i tried using numberformat like this 'Range("A2", "A50000").NumberFormat = "dd-mm-yy"' but this doesnt change anything. i also tried using format(Date,"dd-mm-yy") but this just sets the cell to have the date of...
  9. E

    VBA numberformat doesn't get saved

    Hi guys I got a strange problem. Here is the code to change the columns into 'accounting' numberformat then tries to save and close the workbook. With ActiveSheet .Range("G:I,Q:T").NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)" End With ThisWorkbook.Save...
  10. A

    Use of NumberFormat function chnages cell type from "Number" to "Custom"

    Hi all, I am trying to build a simple number formatting macro that would display negative numbers in parentheses e.g., -24000 should be shown as (24,000.00) or something like that. While I am able to accomplish said formatting change using Numberformat, the command is forcing the cell type to...
  11. C

    Date Format works for one column, but not the other

    Hello one of two lines are not working in Macro Columns("C:C").NumberFormat = "[$-x-sysdate]dddd, mmmm dd, yyyy" Columns("D:D").NumberFormat = "[$-x-sysdate]dddd, mmmm dd, yyyy" Only works for column C. I have tried combining the lines "C:D", reversing order...
  12. T

    Copy formatted cell values to another range as text

    How can I copy a bunch of formatted values to a new range and have them as text values exactly the way they were formatted? for example suppose my Regional Settings are set to French-Canada(note that French-Canada uses a comma for decimal point instead of a period). Note that I choose...
  13. D

    VBA NumberFormat

    is there a way to combine the following two commands in one? Sums_range.NumberFormat = "[>=1000]#'##0;0" Sums_range.NumberFormat = "0;-0;-" the first formats numbers in the 0'000 format (with tone for thousands) and no decimals the second formats zeros to dashes
  14. D

    Format number 0.000,000 to 0'000 ?

    For example number 67,194 (194 are decimals). I'd like it to appear as 67. A bigger number e.g. 12345,194 would appear 12'345. I tried NumberFormat = "0'000" and = "#'##0", but they don't work. The first gives 0'067, the second give '67.
  15. E

    How to get the current week -1 week and CYTD -1 year (use a CYweek in an number format).

    Dear Access wizards, Currently I'm using Access to store weekly data of our market. Every week I receive a flatfile which I integrate in Access. As a timekey I'm using a CYWEEK (example: 201615). Now the thing is, when I make a query, I want to be able to see the latest week (highest value)...
  16. L

    VBA help: Nested If statement with IsNumeric and NumberFormat etc

    Hi, I have a large spreadsheet that I receive often from a lab that I need to perform some statistical analysis on. I have been able to get what I need from nested if statements with regular cell functions, but I fear they may be confusing for my colleagues and am hoping for something a bit...
  17. S

    100 separator in Excel

    Hi All, I need custom number format for 100 separator . can Anyone please provide me the Number format. Thanks, Sandeep
  18. T

    Get formatted value/text of a Range without looping

    I'd like to be able to efficiently read all of the formatted values of a range of cells into an array. When I say formatted values, I mean the values as they are shown on the screen. Range.Value and Range.Value2 can efficiently retrieve the values into an array. Range.Text seems to work only...
  19. H

    Replace NumberFormat VBA Code

    Hi - I want to create a code that searches column T for "1" and replace this with "0001" (so it must be custom formatted to "0000", otherwise the number will be shown as "1" instead). I've done a similar replace/format code for "û" which works perfectly, so I don't know why it keeps giving me a...
  20. Alf1956

    Application.Dialogs(xlDialogFormatNumber) - Ingreso de número personalizado desde macro vba

    Buenas tardes, Uso Excel 2007 Básico. Con Excel 2003 lo hacía sin problemas, pero con la versión 2007, no puedo ingresar el siguiente formato personalizado: ... Selection.NumberFormat = "#,##0.00_);(#,##0.00)" ... Agradeezco se sirvan indicarme si desde una macro, se puede...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top