Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
New line of code.. same argument?
hi. i have a reallly long line of code - big if / or statement.. is there a
way to make it look nicer by bringing it down a row? thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
New line of code.. same argument?
I'm not sure what you are asking here. If you mean you want to move the
formula, as is, to a different cell... select the entire formula in the Formula Bar, Cut it (Ctrl+X), then select the cell you want it in and Paste it there (probably best to Paste it into the Formula Bar). -- Rick (MVP - Excel) "Derrick" wrote in message ... hi. i have a reallly long line of code - big if / or statement.. is there a way to make it look nicer by bringing it down a row? thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
New line of code.. same argument?
not quite. in VBA... its like this:
if ab or cd or ef or gh then but A-h are longer cell references - range("A"&target.Row) so it goes way out to the right side. can i do something whe if Ab or cd or .... than ? "Rick Rothstein" wrote: I'm not sure what you are asking here. If you mean you want to move the formula, as is, to a different cell... select the entire formula in the Formula Bar, Cut it (Ctrl+X), then select the cell you want it in and Paste it there (probably best to Paste it into the Formula Bar). -- Rick (MVP - Excel) "Derrick" wrote in message ... hi. i have a reallly long line of code - big if / or statement.. is there a way to make it look nicer by bringing it down a row? thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
New line of code.. same argument?
VB has a Line Continuation character sequence you can use to do this. Just
put a space character followed by a underline character at any natural breakpoint (that is, **not** in the middle of any keywords or text constants) and then hit the Enter key to move to the next line and continue your code there. For the sample statement you gave, it would look like this... If A B Or _ C D Or _ E F Or _ G H Then Here is a link that explains it in a little more detail... http://support.microsoft.com/kb/141513 -- Rick (MVP - Excel) "Derrick" wrote in message ... not quite. in VBA... its like this: if ab or cd or ef or gh then but A-h are longer cell references - range("A"&target.Row) so it goes way out to the right side. can i do something whe if Ab or cd or ... than ? "Rick Rothstein" wrote: I'm not sure what you are asking here. If you mean you want to move the formula, as is, to a different cell... select the entire formula in the Formula Bar, Cut it (Ctrl+X), then select the cell you want it in and Paste it there (probably best to Paste it into the Formula Bar). -- Rick (MVP - Excel) "Derrick" wrote in message ... hi. i have a reallly long line of code - big if / or statement.. is there a way to make it look nicer by bringing it down a row? thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro code to put series name next to individual line in line grap | Charts and Charting in Excel | |||
Code to read file in reverse fast line by line | Excel Programming | |||
Single line of code with line separator | Excel Programming | |||
Function (array argument, range argument, string argument) vba | Excel Programming | |||
argument in command line | Excel Programming |