Here's a formula if your interested
=SUMPRODUCT((H$5:H$18=C5)*(I$5:I$18<B5)*(J$5:J$18>B5),(K$5:K$18))
Posts by Fluff13
-
-
How about something like
Code
Display MoreSub C3() Dim ary, i Dim Rw As Long ary = Array("0", "1,16", "0,05", "1,05", "0,1", "0,99", "0,15", "0,93") For Rw = 6 To 26 i = Application.Match(Range("R" & Rw).Value, ary, 0) If Not IsError(i) Then Range("Y" & Rw).Value = ary(i) Else Range("Y" & Rw).Value = "Not Found" End If Next Rw End Sub
-
-
-
What sort of value are you putting into E5?
-
Put the Public declaration in a standard module, rather then the Thisworkbook module
-
-
Glad to help & thanks for the feedback
-
How about
Code
Display MorePrivate Sub CommandButton1_Click() With Worksheets("Projects") If .AutoFilterMode Then .AutoFilterMode = False .Range("AT:AT").AutoFilter 1, "1" Intersect(.UsedRange.SpecialCells(xlVisible), Range("B:B,I:K,AD:AF,AK:AQ")).Copy _ Worksheets("sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1) .AutoFilterMode = False End With End Sub
-
How about
Code
Display MoreSub Realign() Dim Rng As Range With Range("A2", Range("A" & Rows.Count).End(xlUp)).SpecialCells(xlConstants, xlTextValues) For Each Rng In .Areas If Rng.Count = 1 Then Rng.Offset(-1, 7).Value = Rng.Offset(-1, 7).Value & " " & Rng.Value Else Rng.Offset(-1, 7)(1).Value = Rng.Offset(-1, 7)(1).Value & " " & Join(Application.Transpose(Rng)) End If Next Rng .EntireRow.Delete End With End Sub