Carry formula in vba to next line

Hello.  I am working on a spreadsheet with vba, etc.  I am using a formula (see below) in the vba macro but would like to split the length of it into 2 lines.  Currently it is one long line.  How or what needs to be done to put it on
two lines correctly so as to shorten the length to a more managable view?
Thanks....John
Range("C38").Value = [SUMIFS(Transaction!$O:$O, Transaction!$B:$B, ">=1/1/2015", Transaction!$B:$B, "<=1/31/2015",Transaction!$C:$C, "BTA Dues", Transaction!$D:$D, "Payment", Transaction!$M:$M, B38,
Transaction!$P:$P, "Income")]

I don't think you can do that with the [ ] syntax. You could use EVALUATE instead, but then the argument becomes a string, and you have to double the quotes within the string:
Range("C38").Value = Evaluate("SUMIFS(Transaction!$O:$O, " & _
"Transaction!$B:$B, "">=1/1/2015"", Transaction!$B:$B, ""<=1/31/2015"", " & _
"Transaction!$C:$C, ""BTA Dues"", Transaction!$D:$D, ""Payment"", " & _
"Transaction!$M:$M, B38, Transaction!$P:$P, ""Income"")")
Regards, Hans Vogelaar (http://www.eileenslounge.com)

Similar Messages

  • Long text to be taken into next line

    Hi,
    I am passing a text in a FM in a BADI, but the text being long enters in the next line  which gives an error saying that 'Literals that take up more than one line are not allowed in OO context'.
    Can someone suggets some way of overcoming this other than storing the text in variables & concatenating it.
    Thanks.

    Hi
      I guess there is no other way apart from concatenating
    the text into a variable. If you dont want to declare a
    new variable for that you can use the same variable.
      move 'First Line' to l_text.
      concatenate l_text 'continuing' into l_text separated
    by space.
    Kind Regards
    Eswar

  • How do you make the sentences you input in a drop down list wrap to the next line?

    How do you make the sentences that you input in a drop down list to wrap to the next line?

    You can't.
    see this thread for more info:  Can you set drop down list as multi-line???

  • How to restrict spool data in the next line in pdf print

    Hi Experts,
    i have spool data which is going to be print in PDF format.
    if line is extented..thenit is prining the in the next line..
    but that next line is not starting after one tab space.
    so how to remove that space.
    can anybody give me help.
    Regards,
    venkat

    Hi,
    output is displaying in pdf file in the give format..
    ex:-
    919   sub     00001      44445       testmater
             ial     final
    here test material is not coming fully in the first line..it is cutting and displaying in 2 lines.
    Regards,
    venkat

  • Next line character error

    Hello All,
    I am trying to concatenate two strings along with next line character. I am using the following syntax.
    v_str1||chr(13)||chr(10)||v_str2;
    The problem I am facing is if the string is like greater than about 40 characters, then the new line character is not getting appended . Instead they are concatenated together without the new line character.
    I also tried using only chr(10). But it is not working. Can anybody plz suggest me a soln to this.
    Thanks,
    Myway
    Edited by: myway on Mar 29, 2009 3:16 PM

    Hi,
    Please post your code that raises the problem, I use this simple example and works fine:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> select 'line 1' || chr(13) || 'line 2' from dual;
    'LINE1'||CHR(13)||'LINE2'
    line 1
    line 2
    SQL>
    SQL> SET SERVEROUTPUT ON
    SQL> DECLARE
      2     v_string VARCHAR2(4000);
      3     v_line1  VARCHAR2(4000) := 'LINE 1';
      4     v_line2  VARCHAR2(4000) := 'LINE 2';
      5     c_line_break CONSTANT VARCHAR2(1) := CHR(13);
      6  BEGIN
      7     v_string := v_line1 || c_line_break || v_line2;
      8     dbms_output.put_line(v_string);
      9  END;
    10  /
    LINE 1
    LINE 2
    PL/SQL procedure successfully completed
    SQL> Regards,

  • How can I find the words which spans across end of line to next line in pdf ?

    I am using Acrobat Adobe X Pro version for our form development and maintanence. I am writting a Acrobat JAVA batch script which reads through all the words and execute spell check and reports the mispelled words in a excel sheet. Since I am running this script in batch mode for more than 1000 pdfs - I am getting many words joined together. When I looked in to those pdfs all such words are looking okay because it is appearing in end of right margin and the next word is in the next line. Since there was no space between them it was extracted as a single word. Hence the failure.
    I used wordf = this.getPageNthWordQuads(i,j)  to get the word begin and end coordinates. when I closely observe the values are creating a rectangle and that doesnt span across lines. I got the coordinates for the regular word and the word which span acoross two lines. both of the coordinates are same.
    I think I am screwed - I have 8000 such words and no clue of how to get rid of them from the actual misspelled words.
    please help. let me know if any class /method if I call will give me the end of line or do I need to go to next layer to find this split.
    the addnot is somehow marking the words using this coordinates - please hellp me understand how this works. Thanks.
    // for all pages
    for (var i = 0; i < this.numPages; i++ )
    // For all the words
    pg += 1;
    numWords = this.getPageNumWords(i);
    for ( j = 0; j < numWords; j++)
    //get the spell check 
    ckWord = spell.checkWord(this.getPageNthWord(i,j))
    if ( ckWord != null )
    jn=0
    ml=0
    // if mispelled word found.
    wordf = this.getPageNthWordQuads(i,j)
    swordf = wordf.toString()
    var st = swordf.split(",")
    var diffx0 = parseInt(st[0])-8
    var diffx1 = parseInt(st[1])-8
    var diffx2 = parseInt(st[2])-8
    var diffx3 = parseInt(st[3])-8
    var diffx4 = parseInt(st[4])-8
    var diffx5 = parseInt(st[5])-8
    var diffx6 = parseInt(st[6])-8
    var diffx7 = parseInt(st[7])-8
    if (cWord == csword)
    jn = 1
    if ( st[1] != st[3] )
    ml = 1
    //dataLine += "\r\n write "
    else
    ml=2
    dataLine += "\r\n"+this.documentFileName
    + "\t" + this.getPageNthWord(i,j)
    + "\t" + pg
    + "\t" + j
    + "\t" + ml
    + "\t" + jn
    + "\t st[0] " + diffx0 + "\t st[1] " + diffx1 + "\t st[2] " + diffx2 + "\t st[3] " + diffx3 
    + "\t st[4] " + diffx4 + "\t st[5] " + diffx5 + "\t st[6] " + diffx6 + "\t st[7] " + diffx7 
    ck=1

    If Acrobat is reading each word part as separate words, you have a problem.
    The way I approached it in some of my tools was to check if a word ends
    with a hyphen, and if so, to check if it's the last on the line. If both
    conditions are true, combine with the next word on the next line. This is
    not fool proof, of course, as there are documents with columns are other
    structural elements that prevent this from working. Better than nothing,
    though...
    However, it is also possible that Acrobat does see both parts as parts of
    the same word. In that case, getPageNthWordQuads() will return multiple
    quads arrays. As you know, that method returns an array of quad arrays.
    There's usually only one, but in principle there could be more... Something
    to check before giving up.

  • Pasting in JTextPane adds the text in the next line not the cursor positon

    Hi,
    I have a problem with pasting the text in a JTextPane. The content type is text/html and the document is HTMLDocument. When I paste the text, it goes to the next line instead of inserting at the current cursor position. The problem is when pasting, the html writer adds a paragraph tag with the selected text. Can any one please help me with this issue for pasting a selected text in the position where I want, without loosing the character attributes and other html tags, but only the paragaraph tags?
    Thanks
    siju

    Hi Tariq,
    If you are specifying some .prt files(printer definition files) in the desformat, please examine them if you have set the width and height to proper values.
    Otherwise look at $ORACLE_HOME/reports/printers/dflt.prt (default file) and see if the width and height are set to proper values.
    Thanks,
    Siva B

  • Printing line items in next line smartforms

    how to print line item description in next line...
    suppose
    i have line item description as
    "this is description of line item"
    then i need to print as
    "this is"
    "description of line item"
    in two lines......
                so that no trunkation takes place please reply me ....

    Use offset
    v_text(20)
    in the second line use
    v_text+20(40)
    If this does not work
    then declare two more fileds
    and write the code
    v_text1 =  v_text(20)
    v_text2 = v_text+20(40)
    and print the new fields
    Reward points if useful,
    Regards,
    Nageswar

  • Trying to set a hyperlink when text wraps to next line

    I'm trying to set a hyperlink in InDesign. The URL text wraps to the next line. One time this worked fine and the link was correct. For two other instances, it did not work. When I checked the link in the PDF file, it only "grabbed" the first portion of the hyperlink address. Anything after the first "/" was lost. Is there a way to make sure the entire URL address gets included in the hyperlink? Thank you!

    Acrobat has trouble autorecognizing URLs that break across lines. You ned to create a "real" hyperlink from the text in ID, then include them in the export. If you don't know how to do that, see the Help.

  • Carry over formatting to the next page without adding a text box

    I've written 15 books on the old pages and had no trouble carrying the formatting to the next page without adding a page or adding a text box to the added page.  I just kept on typing.  I've added the new pages and had trouble right from the start so I went back to the old and got a good start, but going through that added procedure on every new page gets old in a hurry.
    It shows the number of pages at the bottom, but a new page doesn't come on automatically  when I type. 
    Please help.
    Thanks,
    Ron  -  [email protected]

    1. Why not continue to use Pages '09 in your Applications/iWork folder?
    2. In Pages 5:
    Setup (gear icon far right of toolbar) > check Document Body
    and the text will flow from page to page.
    Peter

  • I'm having problem with text boxes.  Whenever i hit the enter button to start a new line or paragraph, the cursor doesn't drop down to the next line.  Instead i get this little red + sign in the box.

    I'm having problem with text boxes.  Whenever i hit the enter button to start a new line or paragraph, the cursor doesn't drop down to the next line.  Instead i get this little red + sign in the box.

    You are absolutely right.  Thought Enter meant Enter.  I was wrong.  Thank you for the help.
    Rod Rogers, Broker
    Accredited Land Consultant (ALC)
    Metcalf Land Company, Inc.
    Office: 864-585-0444
    Mobile: 864-316-0297
    Fax: 864-583-6000
    <http://www.metcalfland.com> www.metcalfland.com

  • In messages, does the return key always 'send' rather than shift to next line/paragraph?

    How may I configure my keyboard or its function so that in 'Messages" pressing the "return" key does not send the message , but moves to the next line.?
    I've looked at preferences etc. but cant seeem to locate an option for the "return" key

        for the       Points.
    8:44 pm      Tuesday; February 25, 2014
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Text tool: Text doesn't goto the next line

    Hi,
    I ran into a problem where my text doesn't go to the next line when I press ENTER.  If I keep on typing, the text would overwrite itself.
    This is only happening in After Effects (it is fine in other apps...Email, Photoshop, etc.).  I know it is probably something I clicked but for the longest time, I couldn't figure it out.
    Any help appreciated.

    As Mylenium suggested, you may have a problem with line spacing. For example, you may have leading set to 0. One way to clear problematic settings is to reset the settings in the Character panel.

  • Why text wraps to next line in Chacacter Mode Report?

    I have developed a Character Mode report. I have followed all guidelines mentioned in on-line help topic 'Setting properties of an ASCII (character mode) report'.
    The problem is that when I print the report, the printer prints around 80 characters and then wraps the remaining text on to the next line. Yes I have set Report Width and Height properties of the report to 132 and 66 resp.
    Shows OK in preview.
    Both Horizontal and vertical Elasticity are FLEXIBLE.
    Result is same on different printers.
    What can be the problem.
    Pl. guide.
    Tariq

    Hi Tariq,
    If you are specifying some .prt files(printer definition files) in the desformat, please examine them if you have set the width and height to proper values.
    Otherwise look at $ORACLE_HOME/reports/printers/dflt.prt (default file) and see if the width and height are set to proper values.
    Thanks,
    Siva B

  • Table of Contents page numbers on next line (solution won't work!)

    I'm having this problem where the page number for my item in the table of contents appears on the next line instead of allt he way to the right on the same line. Example:
    Chapter 1 . . . . . . . . . . . .
    4
    instead of
    Chapter 1 . . . . . . . . . . . .4
    A solution has already been posted, but it won't work for me:
    "This is simple to solve. Select the TOC entry and show the text inspector. There press the "Tab" button for the tabulator seetings. At the bottom is a list of tab stops. Select the last one with a double click and set the number to a slight lower number then the width of your TOC area is. Make sure the tab stop is for right aligning by activating the button on the right side of the tab stop list (but I think it is already). Do that for all TOC levels and don't forget to save the styles." -Frank
    When I try to do this, I type my desired tab stop in (5 in, incidentally) and then as soon as I click outside the field it reverts to the default, which is the full width of my column.
    Anyone know why this might be? Thank you!

    Just to be clear, are you trying to set you tab stop at the 5 inch mark? What is your left margin setting? I believe the tab setting is the distance from the left margin, not the actual point along the paper width. Since you said in an earlier post that you are working on a booklet, I thought perhaps your left margin + 5 may be exceeding the allowable width inside your margins.
    MacBook Pro   Mac OS X (10.4.9)  

Maybe you are looking for