TMW949
12-25-2024, 01:47 PM
Function GallonsSinceLastFill() As Long
' Dim FilledCol As Long
Dim GallonsCol As Long
' FilledCol = 9
GallonsCol = 5
GallonsSinceLastFill = Cells(ActiveCell.Row, GallonsCol).Value
MsgBox (ActiveCell.Row & " - " & Cells(ActiveCell.Row, GallonsCol).Value & " - " & GallonsSinceLastFill)
End Function
This is Excel 365 for Mac version 16.92.
The value I am trying to fetch is 9.866 but the function is returning 10.000.
The result from the MsgBox is as follows:
(My file is PDF, so exact content is "unacceptable".) It says:
"282 - 9.866 - 10"
And the Watch says the type is "string * -1"
Can someone please explain why it's doing this (or what I'm doing wrong)?
This may be a Mac problem (sorry for posting here). I'll try Dropboxing it to a Windows machine and see if i works there. I can't see how to upload the simple sample or get the image into the right format.
' Dim FilledCol As Long
Dim GallonsCol As Long
' FilledCol = 9
GallonsCol = 5
GallonsSinceLastFill = Cells(ActiveCell.Row, GallonsCol).Value
MsgBox (ActiveCell.Row & " - " & Cells(ActiveCell.Row, GallonsCol).Value & " - " & GallonsSinceLastFill)
End Function
This is Excel 365 for Mac version 16.92.
The value I am trying to fetch is 9.866 but the function is returning 10.000.
The result from the MsgBox is as follows:
(My file is PDF, so exact content is "unacceptable".) It says:
"282 - 9.866 - 10"
And the Watch says the type is "string * -1"
Can someone please explain why it's doing this (or what I'm doing wrong)?
This may be a Mac problem (sorry for posting here). I'll try Dropboxing it to a Windows machine and see if i works there. I can't see how to upload the simple sample or get the image into the right format.