The code below is used to copy a non-contiguous rangeof data to another sheet.
The cell at G28 has a variety of number formats applied to it depending on its value. This format is set elsewhere but is display contained in cell B9 of another sheet.
As an example, for a number between 99.9990 and 1000.0005 the format set is "? ??0.??? 0" [spaces intentional].
The problem I have is that, in cell G28, the number is displaying correctly (e.g, 999.998 0). However when the code below is run, the end zero disappears at the new destination (In this case, the first empty cell in column B). In other words, it seems not to copy the format over and I end up with 999.998. There is no formatting in the destination cell.
Can anyone advise on how the code could be modified to carry over the formatting?
I've tried adding the following line after the end if but to no avail:
Sheets("For cert").Cells(Rows.Count, "b").End(xlUp).NumberFormat = Sheets("noform1").Range("b9").Text
Dim di As Byte, bdata(1 To 8)
Dim w2 As Worksheet
Set w2 = Worksheets("Test")
If w2.Range("f22") <> "Never" Then
For di = 1 To 8
bdata(di) = Application.Choose(di, w2.Range("g1"), w2.Range("k1"), w2.Range("g27"), _
w2.Range("g29"), w2.Range("g28"), w2.Range("f25"), w2.Range("g11"), w2.Range("c30"))
Next di
End If
Sheets("Results").Cells(Rows.Count, "b").End(xlUp).Offset(1, -1).Resize(, 8).Value = bdata
Bookmarks