View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Continue line of VBA code on the next line

Obviously I tried as well and it didn't

=Sum(C2:C23)

hit enter and it works

select right after SUM and do Alt+Enter

then exit the cell and it shows #Name error.

You can let Excel correct it, but it puts in a mountain of spaces and some
extra parens.

Nonetheless, the OP was apparently talking about VBA code.
--
Regards,
Tom Ogilvy

"GB" wrote in message
...
I tried creating an if formula, using the alt-enter technique, and the
formula worked, I had it set up like this:

=if(
B1<"",
"Hello",
"Goodbye"
)

And worked, no errors.
Though it would not have worked, if I hadn't gone back and remembered to

put
the commas in that I was originally missing. :)


"Tom Ogilvy" wrote:

You also might need to remove them to use the formula.

--
Regards,
Tom Ogilvy


"GB" wrote in message
...
Another way is that while you are typing in the information to the

cell,
that
if you press Alt-Enter at each point you would like to establish a

break,
then it will give you a new line for each Alt-Enter performed.

This is what copying to the notepad is similar to, but without going

to an
outside utility. I think though also, that each Enter is counted as a
character against the total number of characters that can be entered

into
the
cell, so keep that in mind also.



"peacelittleone" wrote:


I have a really long formula I am trying to set a cell value to.

Is there a way to break the code up over several lines to make it

more
readable and help me debug?

TIA!

Heather.


--
peacelittleone



------------------------------------------------------------------------
peacelittleone's Profile:

http://www.excelforum.com/member.php...o&userid=20937
View this thread:

http://www.excelforum.com/showthread...hreadid=381939