Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I would like to give the user of an application feedback on found data after a search in a simple msgbox. the box will contain date, some integers and a few decimal values. Problem is; how do I format some figures to have, say 2 decimals shown, use 'thousand-separator' etc? Can I use something like NumberFormat = "#,##0.00" in separate items of the msgbox? Here is my code: For j = 3 To cellsDown If loanNumber = Cells(j, 19).Value Then MsgBox ("Følgende lån funnet:") & vbCrLf & vbCrLf & "Låntaker: " & Cells(j, 3).Value _ & vbCrLf & "Valuta: " & Cells(j, 9).Value & vbCrLf & "Credit: " & Cells(j, 7).Value _ & vbCrLf & "SLS Lån: " & Cells(j, 8).Value & vbCrLf & "Dato utbetalt: " & Cells(j, 25).Value _ & vbCrLf & "Beløp utbetalt: " & Cells(j, 26).Value & vbCrLf & "Kurs utbetalt: " & Cells(j, 27).Value _ , vbYesNo, "Detaljer" Exit Sub End If Next j Best regards, NorTor |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use either the format function
Format(Cells(j,9).Value,"#,##0.00") or if the cells are formatted they way you want Use Cells(j,9).Text in your string rather than Cells(j,9) or Cells(j,9).value -- Regards, Tom Ogilvy "NorTor" wrote in message ... Hello, I would like to give the user of an application feedback on found data after a search in a simple msgbox. the box will contain date, some integers and a few decimal values. Problem is; how do I format some figures to have, say 2 decimals shown, use 'thousand-separator' etc? Can I use something like NumberFormat = "#,##0.00" in separate items of the msgbox? Here is my code: For j = 3 To cellsDown If loanNumber = Cells(j, 19).Value Then MsgBox ("Følgende lån funnet:") & vbCrLf & vbCrLf & "Låntaker: " & Cells(j, 3).Value _ & vbCrLf & "Valuta: " & Cells(j, 9).Value & vbCrLf & "Credit: " & Cells(j, 7).Value _ & vbCrLf & "SLS Lån: " & Cells(j, 8).Value & vbCrLf & "Dato utbetalt: " & Cells(j, 25).Value _ & vbCrLf & "Beløp utbetalt: " & Cells(j, 26).Value & vbCrLf & "Kurs utbetalt: " & Cells(j, 27).Value _ , vbYesNo, "Detaljer" Exit Sub End If Next j Best regards, NorTor |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ten minutes after I send my request, Tom gives me a perfect solution!
Thank you so much Tom, I really appreciate your help! Best regards, NorTor On Tue, 9 Sep 2003 09:09:56 -0400, "Tom Ogilvy" wrote: Use either the format function Format(Cells(j,9).Value,"#,##0.00") or if the cells are formatted they way you want Use Cells(j,9).Text in your string rather than Cells(j,9) or Cells(j,9).value |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting values which are in Numeric format to word format | Excel Discussion (Misc queries) | |||
How do I format a MSGBOX to show text and variables in a macro? | New Users to Excel | |||
msgBox sum values | Excel Discussion (Misc queries) | |||
MsgBox | Excel Discussion (Misc queries) | |||
msgbox | Excel Discussion (Misc queries) |