+ Reply to Thread
Results 1 to 14 of 14

Google Sheets: If cell has any value, print this...

  1. #1
    Registered User
    Join Date
    05-30-2004
    Posts
    63

    Google Sheets: If cell has any value, print this...

    How would I write a formula for:

    If cell G3 has any value in it, while H3 remains empty, then print the sum of all the previous values of column F.
    However, if cell H3 also has a value in it, then print the sum of all the previous values of column E.

    How would I write this formula is cell I3 ?

    Thanks,
    (See attachment)

    JH
    Attached Images Attached Images
    Using Excel for Mac
    But mostly use Google Sheets

  2. #2
    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,933

    Re: If cell has any value, print this...

    Not sure what you mean by "print", but if you mean "show in cell", try this...
    =if(and(isvalue(G3),H3=""),sum(F:F),sum(E:E))
    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

  3. #3
    Registered User
    Join Date
    05-30-2004
    Posts
    63

    Re: If cell has any value, print this...

    Great, thanks.
    Do you know of a formula which will work in Google Sheets.
    It doesn't recognise "isvalue"

    JH

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: If cell has any value, print this...

    1. If a query is for Google Sheets, you should (a) say so at the outset and (b) post in the correcty section (I will move this to the Other Platforms section).
    2. Please add Google Sheets to your forum profile where it says MS Office Version.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    05-30-2004
    Posts
    63

    Re: Google Sheets: If cell has any value, print this...

    Thanks,

    Any idea how to do this on Google Sheets?

    JH

  6. #6
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Google Sheets: If cell has any value, print this...

    here is new formula that follows the conditions as written in your request:
    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by janmorris; 08-22-2021 at 11:02 AM.

  7. #7
    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,933

    Re: Google Sheets: If cell has any value, print this...

    Quote Originally Posted by janmorris View Post
    here is new formula that follows the conditions as written in your request:
    Please Login or Register  to view this content.
    I used ISVALUE (which I understand doesnt work in Sheets) because G3<>"" will not catch any text entries in that cell. If there is no chance of entering text, then yes that should work

  8. #8
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Google Sheets: If cell has any value, print this...

    Quote Originally Posted by FDibbins View Post
    I used ISVALUE (which I understand doesnt work in Sheets) because G3<>"" will not catch any text entries in that cell. If there is no chance of entering text, then yes that should work
    original request:
    If cell G3 has any value in it, while H3 remains empty, then print the sum of all the previous values of column F.
    However, if cell H3 also has a value in it, then print the sum of all the previous values of column E.

    Google Sheets uses Data Validation to reject (or display a warning) invalid input
    Screen Shot 2021-08-23 at 11.51.57 am.png

  9. #9
    Registered User
    Join Date
    05-30-2004
    Posts
    63

    Re: Google Sheets: If cell has any value, print this...

    I suppose I asked for the wrong thing because it doesn't do what I need it to do.

    I want it to sum up the total amounts paid in column "I".

    As long as there is a date value in column H, then it should total up everything from column E as well as any amount from column F (providing that had a date value also from column G) but as long as it doesn't have a date value in column H on the same row. I don't know if that makes sense.


    If any row doesn't have a date value in column G or H, then that shouldn't be included in the total.

    Clear as mud, I know.

    JH

  10. #10
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Google Sheets: If cell has any value, print this...

    Hi JH,

    I'm a little confused by your last statement. If there's no date in G or H, why have an entry at all?

    That aside, in the link below, I tried to interpret what I think you're wanting. This might not be the most elegant way to accomplish it, but it seems works. There's one formula in D2 which you'll have to drag down for each new row you add, and there's another formula in E2 which will give you the running total.

    Let us know if we're getting close.

    https://docs.google.com/spreadsheets...it?usp=sharing

  11. #11
    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,933

    Re: Google Sheets: If cell has any value, print this...

    Perhaps you need to look at SUMIF()?
    test for date column to be > 0

  12. #12
    Registered User
    Join Date
    05-30-2004
    Posts
    63

    Re: Google Sheets: If cell has any value, print this...

    Here's the logic...

    I am due a commission amount (Column E).

    But first, I am only paid half of that commission (column F) before being paid the last half at a later date (Column H).

    So I want to keep a running total of how much I have received so far, whether I have been paid half or full.
    Therefore, if there is a date of when I received payment, I want that to be included in the running total.

    If there is no date, then that should not be included.

    It's possible that a row may not have a date yet because a later commission was paid before an earlier one.

    If I have received full payment, then there's no need to count the first half payment anymore for that row.

    Does that make it any clearer?

    JH
    Attached Images Attached Images

  13. #13
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Google Sheets: If cell has any value, print this...

    if it was me, i would change the logic of the spreadsheet....

    G and H would be dates paid (the first half and the second half)
    I would be the amount paid, either half or full.

    elsewhere (a summary sheet) i would put cells that would have the total amount still owing and the total amount paid, then i would also add a simple pie graph that represents the amounts paid and owing.

    this makes easy to see what is owning and from when, and can be checked against an audit (eg bank transfer data etc), but also give the current status.

  14. #14
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Google Sheets: If cell has any value, print this...

    JH,

    Go back to the link I provided above and have another look. I've modified the formula in Column D to suit your needs as I understand it.
    If this isn't what you are looking for, I'm afraid I can't help you any further. Good luck.

+ 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. Google sheets - change cell color based on days past date in another cell
    By Coffey80 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 03-10-2021, 03:20 PM
  2. Google Sheets: Condition formatting in Google sheet
    By cyee in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 02-18-2021, 05:35 PM
  3. [SOLVED] Google sheets script to download file and save it to google drive folder and use it's data
    By western in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 5
    Last Post: 01-18-2021, 01:31 PM
  4. [SOLVED] Google sheets vba to download file and save it to google drive folder and use it's data
    By western in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2021, 08:48 AM
  5. [SOLVED] Google sheets: Function to return a value from another tab/cell
    By rayted in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 08-27-2019, 02:04 PM
  6. 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
  7. 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

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