+ Reply to Thread
Results 1 to 4 of 4

Using an "If" Formula for only visible cells in a list

  1. #1
    Registered User
    Join Date
    06-24-2016
    Location
    Minnesota, USA
    MS-Off Ver
    2010
    Posts
    2

    Using an "If" Formula for only visible cells in a list

    Hello,

    I have encountered a problem that I cannot seem to find an answer to in any of the forums, so I am hoping someone might have some insight to this question.

    I have a large list of data with accounts that have different pieces of equipment. Several accounts have different parts, so some accounts are listed more than once. I have hidden accounts that no longer have the equipment or have no unique value.

    I am trying to show the total value of the equipment for each account by showing the value on the last row that shows duplicates of the same account.

    I figure I can do this by using an IF formula as follows:

    =IF($A6<>$A7,"T","F")

    This will come back with a T if the row is the last in its duplicate range. The problem is that the function is including data that is hidden as well, so some rows show F even though they are either different than a different account listed or not the last row in the duplicate list.

    My question is: Can I use the IF function for only visible cells?

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Using an "If" Formula for only visible cells in a list

    Hello
    You can use the SUBTOTAL function, for example:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you applied a filter for all the cells with "T", however, if there are hidden rows then use:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    this will omit hidden rows.

    DBY

  3. #3
    Registered User
    Join Date
    06-24-2016
    Location
    Minnesota, USA
    MS-Off Ver
    2010
    Posts
    2

    Re: Using an "If" Formula for only visible cells in a list

    Yes, but I am not trying to Sum the values, but rather have the cell say "T" of "F" based on whether the account in the next row is different , thus enabling me to use formulas in adjacent cells that will only show values for the accounts that show a T, meaning it is the last row in a list of duplicate accounts.

    For example, if the T or F If formula is in cell B, and I used the following formula in an adjacent cell:

    =IF(B:B="T",C$7-D$7,"")

    This will only show the value of C-D where the column B shows a T value based on the =IF($A6<>$A7,"T","F") and the other cells will be blank

    But again I run into the problem where the row should say T, but ends up with an F because the row after it is hidden...

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Using an "If" Formula for only visible cells in a list

    Take a look at the attached example file. There a two columns of formulas. One checks 1 or zero if row is hidden and the second does the calculation depending on 1 or 0. This assumes the Account numbers are sorted and grouped together.

    Perhaps this is something you can adapt to your actual sheet.

    DBY
    Attached Files Attached Files

+ 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: 03-03-2016, 06:27 PM
  2. [SOLVED] Macro not Finding "blank" visible cells (when filtering
    By ExcelMasterIamNot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2015, 09:12 PM
  3. Excel Macro to remove "0" resuts and then subtotal list with only visible rows
    By crainaud in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2014, 03:44 PM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. Copy value from column "X" paste into Column "Y" - visible cells
    By kaseyleigh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-22-2012, 05:46 AM
  6. Problem "plotting visible cells only" in List
    By jhovey in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-14-2008, 12:24 PM
  7. [SOLVED] In Excel - a function or operation for "view visible cells"
    By gpyogi in forum Excel General
    Replies: 3
    Last Post: 03-17-2005, 03:06 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