Excel Justify
I see, I am getting the same message as you do.
Earlier, I was using a different code, so would that work for you?
shtCB2D.Range("A35:A39").HorizontalAlignment = xlJustify
--
Regards,
Sébastien
<http://www.ondemandanalysis.com
<http://www.ready-reports.com
"Brad" wrote:
Column width of "B" and "C" 8.43
An example - in Cell B2
="Here is the value "&A2&" and the example doesn't work"
Fill - justify B2:C8 gives the error message
"Cannot justify cell containing numbers or formulas."
"sebastienm" wrote:
Hi,
'Justify' works for me, even on cells containing a formula.
Could you please give an example with Text, Column size and Row size.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com
<http://www.ready-reports.com
"Brad" wrote:
It is my understanding that Excel will not Justify if the range has equations
in it - True?
Assuming that my previous statement is true I was going to have a helper
column in "A" and have my output in "L" and then put in the following logic
(found after my questions). One item that I discovered was if one line was
completely blank it would not "move the text" up. But if I added a " ", the
justify would work.
Three questions - is there a better way to get around the formula issue?
Are there other known issues (other than a blank line) that I should be on
the look out for? If there is not a better wary to get around the formula
issue - is there better logic than the code below?
Sub test()
shtCB2D.Range("L35:L39").Value = shtCB2D.Range("A35:A39").Value
shtCB2D.Range("L35:U39").Justify
End Sub
|