Hi and thanks in advance if you've got the mojo.
I am copying the value of the active cell to a named range cell but I am having an interesting problem. My code is as follows.
V_Tempvalue = ActiveCell.Value
Range("NameHere").Value = V_Tempvalue
The values in the active cell can vary greatly and may include leading spaces. When the ActiveCell contains leading spaces (presumably trailing as well) and only numbers excel imediately converts the value to a number value stripping the spaces. (Most times this would make me happy, but today I need those spaces.)
I could build a function and use len left and right to determin leading and trailing spaces but I figure there has to be a simpler way to load the variable to include the spaces that I am just not thinking of. Is there a better property than "Value".
Thanks,
I have braced myself to feel stupid when someone passes the brain freeze I am having.
I am copying the value of the active cell to a named range cell but I am having an interesting problem. My code is as follows.
V_Tempvalue = ActiveCell.Value
Range("NameHere").Value = V_Tempvalue
The values in the active cell can vary greatly and may include leading spaces. When the ActiveCell contains leading spaces (presumably trailing as well) and only numbers excel imediately converts the value to a number value stripping the spaces. (Most times this would make me happy, but today I need those spaces.)
I could build a function and use len left and right to determin leading and trailing spaces but I figure there has to be a simpler way to load the variable to include the spaces that I am just not thinking of. Is there a better property than "Value".
Thanks,
I have braced myself to feel stupid when someone passes the brain freeze I am having.