Consulting

Results 1 to 6 of 6

Thread: Calculating 99% in entire cell in Col M. Col M is filtered

  1. #1

    Calculating 99% in entire cell in Col M. Col M is filtered

    Dear Expert,
    I am in filtered mode and i want to calculate the 99% of Col M.
    The filtered mode is like this M18,M20,M26,M46 and so on.
    Is there any way that i can automatically calculate 99% of Filtered mode of ColM.

    Please assist?
    Rgds,
    Aligahk06

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    =SUBTOTAL(9,M:M)*0.99
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    Actually i have already value in column M Cell.Since the sheet is in filtered mode i want each value of the filtered cell in Col M to change 99% of the existing value.

    Hope u undersatnd my query?

    Rgds,
    Aligahk06

  4. #4
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    [VBA]Sub My99()
    Dim rng As Range, cel As Range
    Set rng = Intersect(Columns(13), ActiveSheet.UsedRange).SpecialCells(xlCellTypeVisible)
    For Each cel In rng
    cel.Value = 0.99 * cel.Value
    Next
    End Sub
    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    While executinf the program there is error like-
    Run time error 91,
    Object variable or with block variable not set.
    Any help?

  6. #6
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Quote Originally Posted by aligahk06
    While executinf the program there is error like-
    Run time error 91,
    Object variable or with block variable not set.
    Any help?
    Not really. Why not post a sample workbook includimg all your code?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •