+ Reply to Thread
Results 1 to 2 of 2

Google Sheets: how to embed a condition with if clause in given formula

  1. #1
    Forum Contributor
    Join Date
    08-07-2018
    Location
    india
    MS-Off Ver
    2007
    Posts
    233

    Google Sheets: how to embed a condition with if clause in given formula

    HI,
    i have a file in which i generate a report of how much material has packed and shipped. in sheet "FINAL REPORT" there is a formula cell A4. that shows the report when we select drop down in F1 & H1.

    my requirement is that if we leave F1 blank and select only H1 then the data should be according to that.
    i mean to say that FI is drop down of quality which belongs to sheet "UNIQUE ENTRIES" COLUMN B.

    i want that when we select only p.o. no.(3966, 3965 etc) which belongs to sheet "UNIQUE ENTRIES COLUMN A. all regarding qualities should be shown up and when we select drop down in F1 this should be as it is now. means if F1 is blank then result for all quality and if F1 is selected then result only for that particular quality.

    given formula is currently working in sheet " FINAL REPORT", in cell a4.





    =arrayformula(

    query( query( { query(


    { UNI, row(UNI) }, "where Col1 = " & H1 & " and Col2 = '" & F1 & "' order by Col12, Col1, Col2, Col3", 1 );
    query( { UNI, row(UNI) }, "select Col1, Col2, Col3, 'Total', sum(Col5), sum(Col6), sum(Col7), sum(Col8), sum(Col9), sum(Col10), sum(Col11), max(Col12) where Col1 = " & H1 & " and Col2 = '" & F1 & "'

    group by Col1, Col2, Col3 order by max(Col12), Col1, Col2, Col3 ", 1 ) }, "where not Col4 contains 'Total""()' order by Col12, Col1, Col2, Col3", 1 ), "select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11", 1 ) )


    and some one has suggested me to joint this formula with above. here it is.
    & if( len(F1), " and Col2 = '" & F1 & "', ", "" ) & "

    i have tried to joint them but couldn't. so please solve it.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-07-2018
    Location
    india
    MS-Off Ver
    2007
    Posts
    233

    Re: how to embed a condition with if clause in given formula

    here is the link of my original google sheet. so that it will be easy to work there.
    https://docs.google.com/spreadsheets...#gid=922855591

+ 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. Embed Interactive Google Map
    By littlebitofnc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2019, 05:13 PM
  2. [SOLVED] Formula for Clause Point System - E.g. Clause 1 = 10 points, Clause 2 = 5 Points
    By petsean007 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2019, 11:05 PM
  3. Google Apps Script for Google Sheets Pulling Formulas from Master to Several Slave Sheets
    By excelroofing in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 08-22-2018, 02:06 AM
  4. Excel equivalent to Google Sheets' FILTER(range, condition)?
    By Trille in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-14-2016, 06:09 PM
  5. email row contents based on cell values (google sheets populated by google forms)
    By reedg in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 01-13-2016, 02:55 PM
  6. Embed Google Chrome Object into Userform
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2015, 07:06 PM
  7. Replies: 0
    Last Post: 03-03-2014, 04:42 AM

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