Consulting

Results 1 to 4 of 4

Thread: Need help w/formula to show just some amounts

  1. #1
    VBAX Regular
    Joined
    Sep 2011
    Posts
    42
    Location

    Need help w/formula to show just some amounts

    Hi all,

    I have a cost sheet that is calculating totals (highlighted in yellow), with or without a manager’s discount (there is a dropdown in cell F4 that allows me to toggle between the two options). Is it possible to have another dropdown, say cell F5, which would allow me to show just the totals with a manager’s discount? This would be all amounts with an “x” in column V, but every other amount would be zero when toggled. I have to do this with 5 different locations, so I'm trying to minimize the amount of manual work.

    I use the totals to create a sell sheet which has all of our prices, but I also need to create another sell sheet with just the manager specials, so people can see what is on sale, and not cluttered up with the other values. Is this possible?

    Thank you for your time and consideration.
    Attached Files Attached Files

  2. #2
    VBAX Regular
    Joined
    May 2018
    Location
    Sydney
    Posts
    57
    Location
    I've put a formula into the 'Y' column. Is this what you're looking for? If you're talking about some sort of overlay on top of the data you have, then my guess will be VBA.
    I really hope this helps. I'm sorry if it doesn't though.
    Attached Files Attached Files

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    If you do want to go with VBA, you can add Option Button controls to the WS and put a little code behind them


    Capture.JPG



    Option Explicit
    
    Private Sub obAll_Click()
        Application.ScreenUpdating = False
        Me.Rows.Hidden = False
        Application.ScreenUpdating = True
    End Sub
    
    Private Sub obMgr_Click()
        Dim c As Range
        Application.ScreenUpdating = False
        For Each c In Range(Range("B12"), Range("B12").End(xlDown))
            With c.EntireRow
                .Hidden = (.Cells(20).Value = 0#)
            End With
        Next
        Application.ScreenUpdating = True
    End Sub
    
    Private Sub obNoMgr_Click()
        Dim c As Range
        
        Application.ScreenUpdating = False
        For Each c In Range(Range("B12"), Range("B12").End(xlDown))
            With c.EntireRow
                .Hidden = (.Cells(20).Value <> 0#)
            End With
        Next
        Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  4. #4
    VBAX Regular
    Joined
    Sep 2011
    Posts
    42
    Location
    Thanks guys, yeah this works! Appreciate the help Paul and Grade4.2

    Have a wonderful day guys.

Posting Permissions

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