• IF function + NBCAR

    From Claus Busch@21:1/5 to All on Wed Aug 28 21:04:52 2019
    Hi Andrea,

    Am Wed, 28 Aug 2019 19:46:12 +0100 schrieb Andrea P:

    I would like to have a formula that only applies to a cell if another
    has been filled beforehand.

    So cells in the column G might contain a text.

    Colum N has to show the number of characters that column G contains
    (=LEN) but I don't want column N to contain the number 0 if column G has
    no text. I would rather have column N blank.

    So for example:

    /// A..B..C...G......................................N 1.....................asdaljda.......................8 2....................-......................................... 3....................sdjf..................................4

    try:
    =SI(NBCAR(G1)>0;NBCAR(G1);"")

    You can post questions about VBA in
    microsoft.public.excel.programming


    Regards
    Claus B.
    --
    Windows10
    Office 2016

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrea P@21:1/5 to All on Wed Aug 28 19:46:12 2019
    I would like to have a formula that only applies to a cell if another
    has been filled beforehand.


    So cells in the column G might contain a text.

    Colum N has to show the number of characters that column G contains
    (=LEN) but I don't want column N to contain the number 0 if column G has
    no text. I would rather have column N blank.

    So for example:

    /// A..B..C...G......................................N 1.....................asdaljda.......................8 2....................-......................................... 3....................sdjf..................................4

    Also, I work with the French version of Excel and so I can find the
    equivalents for the terms but I don't if the punctuation changes across languages... does it?

    Can I ask questions about macros in here or not really?

    Thank you! :)

    Andréa




    --
    Andrea P

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Claus Busch@21:1/5 to All on Thu Aug 29 16:56:50 2019
    Hi Andrea,

    Am Thu, 29 Aug 2019 15:31:48 +0100 schrieb Andrea P:

    I got an error message saying the formula is incoherent. It proposed me
    to add an asterisk (*) as follows:

    =SI(NBCAR(G70)*0;NBCAR(G70);"")

    my posted formula should work. I guess the issue is caused by the
    separators. I don't know what separators are used in a french system.
    Try my formula and change the semicolon to comma.

    You could use only
    =NBCAR(G70)
    and deactivate "In cells with zero values show 0" in the options.

    Regards
    Claus B.
    --
    Windows10
    Office 2016

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrea P@21:1/5 to All on Thu Aug 29 15:31:48 2019
    Hello!

    Thank you so much for your fast answer.

    I got an error message saying the formula is incoherent. It proposed me
    to add an asterisk (*) as follows:

    =SI(NBCAR(G70)*0;NBCAR(G70);"")


    But it still does not work. I want N to show the number of characters
    that G contains (if it contains any).

    Thank you!

    Claus Busch;1631606 Wrote:
    Hi Andrea,

    Am Wed, 28 Aug 2019 19:46:12 +0100 schrieb Andrea P:
    -
    I would like to have a formula that only applies to a cell if another
    has been filled beforehand.

    So cells in the column G might contain a text.

    Colum N has to show the number of characters that column G contains
    (=LEN) but I don't want column N to contain the number 0 if column G
    has
    no text. I would rather have column N blank.

    So for example:

    /// A..B..C...G......................................N 1.....................asdaljda.......................8 2....................-......................................... 3....................sdjf..................................4-

    try:
    =SI(NBCAR(G1)0;NBCAR(G1);"")

    You can post questions about VBA in
    microsoft.public.excel.programming


    Regards
    Claus B.
    --
    Windows10
    Office 2016




    --
    Andrea P

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?ISO-8859-1?Q?Beno=EEt?=@21:1/5 to Claus Busch on Thu Aug 29 17:20:01 2019
    Claus Busch <claus_busch@t-online.de> wrote:

    Hi Andrea,

    Am Thu, 29 Aug 2019 15:31:48 +0100 schrieb Andrea P:

    I got an error message saying the formula is incoherent. It proposed me
    to add an asterisk (*) as follows:

    =SI(NBCAR(G70)*0;NBCAR(G70);"")

    my posted formula should work. I guess the issue is caused by the
    separators. I don't know what separators are used in a french system.
    Try my formula and change the semicolon to comma.

    You could use only
    =NBCAR(G70)
    and deactivate "In cells with zero values show 0" in the options.


    Since SI = IF there has to be a « reason if » so I would write: =SI(NBCAR(G70)=0;NBCAR(G70);"")
    ^^^

    It's in fact (IF;THEN;ELSE)


    --
    Vie : n.f. maladie mortelle sexuellement transmissible
    Benoit chez lui à leraillez.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrea P@21:1/5 to All on Thu Aug 29 17:49:51 2019
    How do you do deactivate "In cells with zero values show 0" in the
    options? I can't find it...

    Thank you!

    Claus Busch;1631614 Wrote:
    Hi Andrea,

    Am Thu, 29 Aug 2019 15:31:48 +0100 schrieb Andrea P:
    -
    I got an error message saying the formula is incoherent. It proposed
    me
    to add an asterisk (*) as follows:

    =SI(NBCAR(G70)*0;NBCAR(G70);"")-

    my posted formula should work. I guess the issue is caused by the
    separators. I don't know what separators are used in a french system.
    Try my formula and change the semicolon to comma.

    You could use only
    =NBCAR(G70)
    and deactivate "In cells with zero values show 0" in the options.

    Regards
    Claus B.
    --
    Windows10
    Office 2016




    --
    Andrea P

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Claus Busch@21:1/5 to All on Thu Aug 29 20:11:15 2019
    Hi Andrea,

    Am Thu, 29 Aug 2019 17:49:51 +0100 schrieb Andrea P:

    How do you do deactivate "In cells with zero values show 0" in the
    options? I can't find it...

    Options => Advanced => Display options for this worksheet


    Regards
    Claus B.
    --
    Windows10
    Office 2016

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrea P@21:1/5 to All on Fri Aug 30 20:26:59 2019
    Unfortunately, I need those cells to be blank because I'm making an
    macro that updates the sheet. When I press Ctrl+A, it usually only
    selects the actual used range. But with the option to not show the
    zeros, the cells are still filled so I have a very big range selected
    which slows the macro down.

    Help!

    Claus Busch;1631617 Wrote:
    Hi Andrea,

    Am Thu, 29 Aug 2019 17:49:51 +0100 schrieb Andrea P:
    -
    How do you do deactivate "In cells with zero values show 0" in the
    options? I can't find it...-

    Options = Advanced = Display options for this worksheet


    Regards
    Claus B.
    --
    Windows10
    Office 2016




    --
    Andrea P

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Claus Busch@21:1/5 to All on Fri Aug 30 21:59:42 2019
    Hi Andrea,

    Am Fri, 30 Aug 2019 20:26:59 +0100 schrieb Andrea P:

    Unfortunately, I need those cells to be blank because I'm making an
    macro that updates the sheet. When I press Ctrl+A, it usually only
    selects the actual used range. But with the option to not show the
    zeros, the cells are still filled so I have a very big range selected
    which slows the macro down.

    download the file from here: https://1drv.ms/x/s!AqMiGBK2qniTgeV9fANtV6RHasVDLg?e=QJRpUh
    When you open it on your system, the formulas should be translated to
    French.


    Regards
    Claus B.
    --
    Windows10
    Office 2016

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)