+ Reply to Thread
Results 1 to 13 of 13

remaining quantity bar (related to total quantity)

Hybrid View

  1. #1
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: remaining quantity bar (related to total quantity)

    Quote Originally Posted by vermaccio View Post
    ...thank you but i would prefer to avoid macro.
    I've been working doubles for a couple of days, just got back on this last night. I see torachan beat me to it, and vermaccio's not interested, but here's my VBA code. This has 2 extra features; the bar responds to changes in EITHER column, and it handles multiple pasted entries.
    Private Sub Worksheet_Change(ByVal Target As Range)
    
    Dim MCL As Range, KCL As Range
    
    With Range(Cells(6, "K"), Cells(Rows.Count, "K").End(xlUp))
        Set Target = Intersect(Target, .Offset(0, 2))
    End With
    
    If Not Target Is Nothing Then
    
    For Each MCL In Target
        Set KCL = MCL.Offset(0, -2)
        With MCL.FormatConditions
            .Delete
        With .AddDatabar
            .MinPoint.Modify xlConditionValueNumber, 0
            .MaxPoint.Modify xlConditionValueFormula, "=" & KCL.Address
            .BarFillType = xlDataBarFillSolid
            
            If KCL > 0 Then
                .BarColor.Color = RGB(255, 85, 90)
            End If
            If KCL < MCL Then
                .BarColor.Color = RGB(255, 0, 0)
            End If
        End With
        End With
    Next
    
    End If
    
    End Sub
    Attached Files Attached Files
    Last edited by leelnich; 06-09-2023 at 07:25 AM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

+ 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. [SOLVED] Percent complete based off quantity finished and quantity remaining
    By BigPaulMc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2022, 02:29 PM
  2. Google Sheets: remaining quantity formula???
    By denis_galenkov in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 11-14-2020, 07:54 PM
  3. Google Sheets: remaining quantity formula???
    By denis_galenkov in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-14-2020, 06:51 AM
  4. [SOLVED] Remaining quantity calculation
    By Villalobos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-02-2017, 02:12 PM
  5. [SOLVED] Running total of Quantity on Hand Vs Sales Vs Quantity to Produce
    By jespo1351 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2015, 07:34 AM
  6. Remaining Containers based on Quantity balance
    By thong127 in forum Excel General
    Replies: 3
    Last Post: 02-18-2015, 05:29 PM
  7. Replies: 4
    Last Post: 01-14-2015, 07:46 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