View Single Post
  #2   Report Post  
Posted to microsoft.public.scripting.vbscript,microsoft.public.excel.programming
LakeGator LakeGator is offline
external usenet poster
 
Posts: 1
Default How to insert the Thousands Separator (comma) in Excel?

On Jun 14, 10:58 am, Highlander wrote:
Hello all.

I've got a VBScript that takes a CSV file, makes some formatting
changes, and saves it to an XLS file. What I'd like to add to this
script is the command to insert the Thousands Separator in column B
for the entire column. Column B contains numbers in every cell except
for the top cell which has a word.

In searching I did find the Constant "Const xlThousandsSeparator = 4"
but I can't quite figure out how to write the line to implement it.

Any suggestions would be greatly appreciated. Thanks!

My script: (trimmed out to save valuable electronic trees)


The approach I take in cases like this is to record an Excel Macro.
This creates VBA code to implement what I need. I then translate the
VBA into VBScript.

I believe this will work for your case. Hope it helps.