Cell data format

F

falloutx

I created a file which uses advance filtering on a database worksheet
On clicking a button, the advance filtering work its magic. But when
copy another set of data into that database, the advance filtering doe
not work. I figured out its the cell data format that is giving me th
problem.

Cell A2 is the raw data I will copy. Data type = text
Cell A4 is the copied data and I changed the format to 00.0000
Cell A6:A7 is same as A4, BUT I typed the same data
Cell A9 is the required format.

Even after changing the format of A2 to 00.0000 (results in cell A4)
The advance filtering does not work. But after I retyped the exact sam
data into cell A4, it will automatically align right. It is only afte
this, the advance filtering works.

I cannot understand why. Is there a meaning behind the automati
allignment from left to right? How can I change the format with VB
code to something like cell A

+-------------------------------------------------------------------
|Filename: Format.zip
|Download: http://www.excelforum.com/attachment.php?postid=4345
+-------------------------------------------------------------------
 
P

pinmaster

Yes, text will automatically align to the left, numbers to the right
unless the cell was preformatted with a specific alignment.

Try this:

Type the number "1" in a blank cell, next copy that cell, select your
data in column A and go to Edit/Paste Special and "Multiply"....hit OK


HTH
Jean-Guy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top