<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBA: замена запятой на точку в Ексель]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=17816&amp;type=atom" />
	<updated>2023-06-05T06:10:49Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=17816</id>
		<entry>
			<title type="html"><![CDATA[VBA: замена запятой на точку в Ексель]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=158452#p158452" />
			<content type="html"><![CDATA[<p>Всем привет! Создаю макрос по замене в файле Ексель чисел с разделителем запятая, при формате ячеек Общий, на числа с разделителем точка, и изменении формата ячейки на Текстовый!<br />Хотел создать такой макрос на основе этого, но что-то не выходит, буду благодарен за помощь!<br /></p><div class="codebox"><pre><code>Sub Fix_Numbers_From_Dates()
    Dim num As Double, cell As Range
 
    For Each cell In Selection
        If Not IsEmpty(cell) Then
            If cell.NumberFormat = &quot;General&quot; Then
                num = CDbl(Replace(cell, &quot;.&quot;, &quot;,&quot;))
            Else
                num = CDbl(Format(cell, &quot;m,yyyy&quot;))
            End If
            cell.Clear
            cell.Value = num
        End If
    Next cell
End Sub </code></pre></div>]]></content>
			<author>
				<name><![CDATA[Andropov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=43158</uri>
			</author>
			<updated>2023-06-05T06:10:49Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=158452#p158452</id>
		</entry>
</feed>
