Results 1 to 10 of 33

Thread: Special concatenation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    14
    "0.00" can't be returned, since the value =0, only the formatted presentation of that value is 0.00

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,458
    Rep Power
    10
    Quote Originally Posted by snb View Post
    "0.00" can't be returned, since the value =0, only the formatted presentation of that value is 0.00
    . This seems to work, as long as The Elements are Dimensioned as a String.

    Code:
    Sub FormatInArray()
    'Worksheet info
    Dim ws1 As Worksheet: Set ws1 = ThisWorkbook.Worksheets("Sheet1") 'Sheet Info
     
    Dim Data(1 To 2) As String
    Let Data(1) = 0
    Let Data(2) = 0
    Let Data(1) = Format(Data(1), "0.00")
    Let ws1.Cells(2, 4).Value = Data(1)
    Let ws1.Cells(3, 4).Value = Data(2)
     
    End Sub

    Using Excel 2007
    Row\Col
    D
    2
    0,00
    3
    0
    Sheet1

    . But I guess that is what you are saying, sort of - To do with Formatting.. or Wotever (Whatever)

    . I just did not realise that one can Put Format into Part of an Array in that way such that the output comes out in the spreadsheet like that. This is wot (what) I learned from Rick's code. That could come in handy as another "work around" I often need to cure problems I get with excel annoyingly changing comers to points, and / or changing numbers to date formats etc...

Similar Threads

  1. Flexible Concatenation Function
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 23
    Last Post: 05-11-2019, 08:22 PM
  2. copy special cells with values and formats
    By rodich in forum Excel Help
    Replies: 1
    Last Post: 10-25-2013, 03:55 PM
  3. To Paste special by value
    By ravichandavar in forum Excel Help
    Replies: 7
    Last Post: 08-13-2013, 12:23 PM
  4. FORMATTED Flexible Concatenation Function
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 1
    Last Post: 10-14-2012, 03:48 PM
  5. Remove Special Characters :
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 3
    Last Post: 03-06-2012, 09:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •