close

I am forced to work with an Excel sheet that was imported from SAS. It
contains the standard period quot;.quot; in all cells where the data was missing. I
cannot rerun the SAS to eliminate the missing data marks. Is there a way to
eliminate the quot;.quot; in Excel without also eliminating the decimal point in
numeric cell values?

I found the answer myself. You just select the quot;Match Entire Cell Contentsquot;
option. Thanks anyway!

quot;Mitchquot; wrote:

gt; I am forced to work with an Excel sheet that was imported from SAS. It
gt; contains the standard period quot;.quot; in all cells where the data was missing. I
gt; cannot rerun the SAS to eliminate the missing data marks. Is there a way to
gt; eliminate the quot;.quot; in Excel without also eliminating the decimal point in
gt; numeric cell values?

You could write code to loop through the cells and using an if statement
test if worksheets(1).range(CellVariable).value2 = quot;.quot;quot;Mitchquot; gt; wrote in message
...
gt;I am forced to work with an Excel sheet that was imported from SAS. It
gt; contains the standard period quot;.quot; in all cells where the data was missing.
gt; I
gt; cannot rerun the SAS to eliminate the missing data marks. Is there a way
gt; to
gt; eliminate the quot;.quot; in Excel without also eliminating the decimal point in
gt; numeric cell values?
press Ctrl-H to get the Replace dialog box. Put the period in the Find box
and leave the Replace box empty

Check the box for quot;match entire cell contents.quot; (If it doesn't show, click
the Options button to display it)
quot;Mitchquot; wrote:

gt; I am forced to work with an Excel sheet that was imported from SAS. It
gt; contains the standard period quot;.quot; in all cells where the data was missing. I
gt; cannot rerun the SAS to eliminate the missing data marks. Is there a way to
gt; eliminate the quot;.quot; in Excel without also eliminating the decimal point in
gt; numeric cell values?

Ryan Jones wrote...
gt;You could write code to loop through the cells and using an if statement
gt;test if worksheets(1).range(CellVariable).value2 = quot;.quot;
gt;
gt;quot;Mitchquot; gt; wrote in message
gt;gt;I am forced to work with an Excel sheet that was imported from SAS. It
gt;gt;contains the standard period quot;.quot; in all cells where the data was missing.
gt;gt;I cannot rerun the SAS to eliminate the missing data marks. Is there a
gt;gt;way to eliminate the quot;.quot; in Excel without also eliminating the decimal
gt;gt;point in numeric cell values?

VBA isn't necessary. Use Edit gt; Replace to replace . with nothing, but
make sure to check the box for 'Match entire cell contents'. That'll
replace/eliminate periods that are the entire contents of their cells
while leaving cells containing numbers with fractional parts as-is.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()