+ Reply to Thread
Results 1 to 4 of 4

Office solution doesn't work in GSheets. Why?

  1. #1
    Registered User
    Join Date
    07-16-2022
    Location
    England
    MS-Off Ver
    2019
    Posts
    8

    Office solution doesn't work in GSheets. Why?

    Hi,

    I have the fowllowing use case:

    Every third cell in a row may contain only one of the follwoing: 0, >0 and blank(I'll mark it as _) values .

    Some examples:

    C1 = _
    C2 = 0 F2 = _
    C3 = 0 F3 = 0 I3 = _
    C4 = 125 F4 = _
    C5 = 0 F5 = 323
    C6 = 0 F6 = 0 I6 = 445


    All the values in between (for A,B, D, E etc. are not blank but irrelevant for me)

    My output should be as follows:

    Unless there is a >0 value in one of these cells ==> "NA"
    If there is a >0 value in one of these cells ==> The number of 0's in the row + 1

    Sם, for the rows above, the expected out puts should be as follows:

    NA
    NA
    NA
    1
    2
    3


    I was trying to apply the following formula on GSheets but it doesn't work for me:

    =IFERROR(AGGREGATE(14,6,{1,2,3}/(INDEX($A1:$I4,,{3,6,9})>0),1),"NA")

    What is the error?

    Thanks
    Last edited by dushkin; 07-17-2022 at 06:57 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Office solution doesn't work in GSheets. Why?

    For the college forum members.

    This is the earlier (related) question.

    https://www.excelforum.com/excel-gen...-in-a-row.html
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    07-16-2022
    Location
    England
    MS-Off Ver
    2019
    Posts
    8

    Re: Office solution doesn't work in GSheets. Why?

    Yes I know. It might not be the most elegant solution and obviously it is not a generic solution, but this one works for me:

    =IF(ISBLANK(E50), "NA", IF(E50 > 0, 1, IF(ISBLANK(H50), "NA", IF(H50 > 0, 2, IF(ISBLANK(K50), "NA", IF(K50 > 0, 3, IF(ISBLANK(N50), "NA", IF(N50 > 0, 4, IF(ISBLANK(Q50), "NA", IF(Q50 > 0, 5, IF(ISBLANK(T50), "NA", IF(T50 > 0, 6, "NA"))))))))))))

    If you have a shorter way - I'll be glad to hear about.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Office solution doesn't work in GSheets. Why?

    Not necessarily shorter...
    =IF(E50="", "NA", IF(E50 > 0, 1, IF(H50="", "NA", IF(H50 > 0, 2, IF(K50="", "NA", IF(K50 > 0, 3, IF(N50="", "NA", IF(N50 > 0, 4, IF(Q50="", "NA", IF(Q50 > 0, 5, IF(T50="", "NA", IF(T50 > 0, 6, "NA"))))))))))))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 01-11-2021, 10:35 AM
  2. Macro for MS Office 2010 doesn't work for 2013
    By levitikus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-30-2015, 06:29 AM
  3. [SOLVED] Flooring timestamp to minutes mystery (Have solution that doesn't quite work)
    By gregersdk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-12-2014, 12:05 PM
  4. Formula range auto extend doesn't work in office 2007
    By crunchor in forum Excel General
    Replies: 3
    Last Post: 08-03-2014, 09:56 PM
  5. Indirect doesn't work even if files are open - office 2010
    By Alexander_Golinsky in forum Excel General
    Replies: 0
    Last Post: 08-07-2012, 02:24 AM
  6. Replies: 5
    Last Post: 06-21-2012, 10:12 AM
  7. Replies: 1
    Last Post: 05-27-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1