+ Reply to Thread
Results 1 to 7 of 7

apply formula to only those rows that are visible after sort

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    Delaware, OH
    MS-Off Ver
    Office 2019/Office 365
    Posts
    65

    apply formula to only those rows that are visible after sort

    Hi,

    I have created code to filter data in column E for specific criteria. Now I want to use a formula in column I for only those rows that are visible. The number of rows will change each week. Below is the code I have thus far. Thank you in advance for any help. I am still learning VBA a little at a time.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,911

    Re: apply formula to only those rows that are visible after sort

    What is the formula you want to add?

    BSB

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    Delaware, OH
    MS-Off Ver
    Office 2019/Office 365
    Posts
    65

    Re: apply formula to only those rows that are visible after sort

    =(Hx*1.5)*Gx where x equals the line number.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: apply formula to only those rows that are visible after sort

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-25-2013
    Location
    Delaware, OH
    MS-Off Ver
    Office 2019/Office 365
    Posts
    65

    Re: apply formula to only those rows that are visible after sort

    I have been busy working on other projects and just got back to this today. The code you sent me did not work. I need to apply the formula to all VISIBLE records in column "I". In the example I am working with, row 74, 75, 90 and 126 appear in the sort. Your code starts with I which is not part of my sort. I only need to apply the formula to those rows appearing after the sort. Any help at all to solve this problem would be greatly appreciated. Thank You!

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,911

    Re: apply formula to only those rows that are visible after sort

    Quote Originally Posted by mlski4751 View Post
    I need to apply the formula to all VISIBLE records in column "I".
    Quote Originally Posted by mlski4751 View Post
    Your code starts with I which is not part of my sort.
    I'm confused as these two statements appear to contradict each other.
    Perhaps if you post a sample workbook and show which cells you want the formula added to that would help.

    BSB

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: apply formula to only those rows that are visible after sort

    You're going to want R1C1 references since the first visible cell may not be in row 2:

    Please Login or Register  to view this content.

+ 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. Only apply formula for visible cells isn't working
    By cyborg31 in forum Excel General
    Replies: 4
    Last Post: 02-17-2016, 03:57 PM
  2. Formula to count number of visible rows, and formula to count visible blanks
    By radoncadonc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-28-2015, 04:19 PM
  3. [SOLVED] how do you apply formatting to just visible cells?
    By ammartino44 in forum Excel General
    Replies: 4
    Last Post: 05-06-2014, 08:01 PM
  4. Apply COUNTIF to visible cells in a range
    By Belthasar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-21-2013, 05:15 AM
  5. Apply formula only to visible cells after filtering
    By excelnd in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-28-2012, 06:47 AM
  6. Use visible rows from autofilter to build Pivot table. Or use visible rows to Copy/Paste
    By mwhitedesigns in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2012, 10:34 AM
  7. Apply formula only to visible cells
    By Fatboy10 in forum Excel General
    Replies: 2
    Last Post: 06-17-2012, 07:34 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