+ Reply to Thread
Results 1 to 9 of 9

nested IF formula with ISBLANK and MAX functions

  1. #1
    Registered User
    Join Date
    06-15-2021
    Location
    Malta
    MS-Off Ver
    365
    Posts
    24

    nested IF formula with ISBLANK and MAX functions

    Hi everyone. I am new on the forum. I searched and tried several formulas but without success, so hoping that you will be able to help me.

    What I am trying to do is:
    IF attempt 3 is blank; then check IF attempt 2 is blank ; then check if attempt 1 is blank, show “N/A”, else then Show attempt 1, else show attempt 2, else show attempt 3).

    Second version is similar but has an added MAX function to show the final result, so:
    IF attempt 3 is blank then check if attempt 2 is blank, if it is not blank, then take the max from attempt 3a and 3b; then check if attempt 2 is blank, if yes check if attempt 1 is blank, if not take the max from attempt 2a and 2b; then check if attempt 1 is blank, if yes, show "" (instead of 0), if not, then take max from attempt 1a and 1b.

    I tried different versions of ISBLANK and NOT(ISBLANK). This is the last one that I came up with, but it says that there are too many arguments:

    IF(ISBLANK(E2),C2,IF(ISBLANK(A2),"",MAX(A2,B2),IF(NOT(ISBLANK(C2),MAX(C2,D2),IF(NOT(ISBLANK(E2),MAX(E2,F2))))))

    IFS(NOT(ISBLANK(A3),MAX(A3,B3),IF(NOT(ISBLANK(C3),MAX(C3,D3),IF(NOT(ISBLANK(E3),MAX(E3,F3),"")

    where A2 is 1attemptA, B2 is 1attemptB, C2 and D2 are second attempt, and E2 and F2 are third attempt.

    In the first formula I tried going backwards from third attempt to first and in the second from first to third.

    Would appreciate any help. If something is not clear, please do tell.

    Thank you!

    Attaching a supporting document. Hope this helps. Added my comments in it. the formulas have no =, as all of them say that there are too many arguments.
    Attached Files Attached Files
    Last edited by Jasminia; 06-15-2021 at 10:32 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: nested IF formula with ISBLANK and MAX functions

    Hi and welcome to the forum.

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    06-15-2021
    Location
    Malta
    MS-Off Ver
    365
    Posts
    24

    Re: nested IF formula with ISBLANK and MAX functions

    Thank you Richard. File attached to the first post.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: nested IF formula with ISBLANK and MAX functions

    One way in H2 copied down

    =INDEX(B2:G2,1,MATCH(9^99,B2:G2))

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: nested IF formula with ISBLANK and MAX functions

    H2 cell formula

    HTML Code: 

  6. #6
    Registered User
    Join Date
    06-15-2021
    Location
    Malta
    MS-Off Ver
    365
    Posts
    24

    Re: nested IF formula with ISBLANK and MAX functions

    Thank you very much! Saw the index function, but couldn't figure out how to use it. It works

    There is one more trick to this formula in another file. In between the results I have two columns: one with text (if a student was present/absent) which doesn't affect the formula and the other with the date of when the exam took place. This unfortunately affects the formula. Probably that was the reason to use those complicated ones

    I would appreciate your help. I am attaching the file again with a second sheet, where I added also the dates.
    Attached Files Attached Files

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: nested IF formula with ISBLANK and MAX functions

    worksheet name : Sheet2
    Cell N2 formula , Drag down

    HTML Code: 

  8. #8
    Registered User
    Join Date
    06-15-2021
    Location
    Malta
    MS-Off Ver
    365
    Posts
    24

    Re: nested IF formula with ISBLANK and MAX functions

    You are a genius! Thank you so much. This really made my day

    If I may, one more question, to make it perfect. If there is no grade yet, is it possible to make the cell stay blank?

    and the last one (this is not necessary, but a curiosity), when I added columns with links I noticed that if there are for example 5 students and the link to the folder is merged along those 5 students, the first row is not taken into consideration and as a result instead of a number it shows the link. However if I have 50 students and let's say a link every 5, the link instead of the result appears only in some cases and in some the result appears correctly. Do you know why? I am only trying to see why in some cases it works and in some doesn't.

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: nested IF formula with ISBLANK and MAX functions

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'.

    =IFERROR(LOOKUP(2,1/((ISNUMBER(FIND("hse",$D$1:$M$1)))*($D2:$M2<>"")*COLUMN($D2:$M2)),$D2:$M2),"")

+ 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: 2
    Last Post: 02-22-2018, 06:27 PM
  2. [SOLVED] Nested if(isblank) statement
    By Groovicles in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-13-2013, 09:50 AM
  3. [SOLVED] nested If(isblank ) - at least I think that's what I need.
    By ABI_Consulting in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2013, 07:22 PM
  4. [SOLVED] Using if and isblank nested.
    By markDuffy in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-29-2013, 07:49 PM
  5. Help with ISBLANK function referring to a cell with another ISBLANK formula
    By camdameron in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-23-2011, 12:45 PM
  6. Nested IF and Isblank
    By daznav in forum Excel General
    Replies: 2
    Last Post: 06-24-2010, 11:29 AM
  7. Nested ISBLANK
    By LukeD in forum Excel General
    Replies: 2
    Last Post: 01-20-2010, 07:28 AM

Tags for this Thread

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