So the data I'm working with has a column with lengths of pipe written like this: 5'4"
The procedure I copied off the internet (quite thorough and lengthy, let me know if you want the link) will parse that into decimal feet, but it requires a separator between feet and inches. So I do a search/replace as such:
(btw anyone reading anything I write, please feel free to be very judgmental and tell me better ways of writing things. Always appreciated!)
Problem is, if I re-run the code, now I get double dashes and that blows up the function that calculates feet. I suppose I could just go back in and search for and replace double dashes with a single dash each time, but, is there a better way? Only thing I can think of is to go through each cell in the column and use InStr to search for a dash and if there isn't one there, to skip to the next cell. Seems like a very time-consuming thing to do.
Thoughts? Advice? I'd rather not modify the decimal-feet calculation function but perhaps that might be the best place to handle this sort of thing, long term.
Thanks!!
Matt
The procedure I copied off the internet (quite thorough and lengthy, let me know if you want the link) will parse that into decimal feet, but it requires a separator between feet and inches. So I do a search/replace as such:
Code:
With Cells(1, iQty).EntireColumn
.Replace What:="'", Replacement:="'-"
End With
(btw anyone reading anything I write, please feel free to be very judgmental and tell me better ways of writing things. Always appreciated!)
Problem is, if I re-run the code, now I get double dashes and that blows up the function that calculates feet. I suppose I could just go back in and search for and replace double dashes with a single dash each time, but, is there a better way? Only thing I can think of is to go through each cell in the column and use InStr to search for a dash and if there isn't one there, to skip to the next cell. Seems like a very time-consuming thing to do.
Thoughts? Advice? I'd rather not modify the decimal-feet calculation function but perhaps that might be the best place to handle this sort of thing, long term.
Thanks!!
Matt