Excel - Sumit
Asked By Joel
20-Nov-09 06:21 PM
TIA:
Trying to do this:
=sumif(A1:A10,"<B10",A1:A10) but "<B10" is taken literally, not as a value
of B10.
Anyway to set criteria as cell reference such as <B10 ??
Thanks,
Joel
Fred Smith replied to Joel
Do it this way:
=sumif(A1:A10,"<"&B10,A1:A10)
Regards,
Fred
Peo Sjoblom replied to Joel
Use
A1:A10,"<"&B10,
when you test for cell contents
--
Regards,
Peo Sjoblom
Joel replied to Fred Smith
Joel replied to Peo Sjoblom
Peo:
Thanks so much!
Joel
different worksheet? Excel Worksheet Discussions WorksheetFunction (1) Worksheet (1) Macro (1) Sharon (1) Gsnu200790 (1) Sumit (1) Insert the following macro and assign a shortcut key to it (say CNTRL-e ): Sub sumit() Range("Z100").Value = Application.WorksheetFunction.Sum(Selection) Range("Z100").Copy End Sub The macro uses
ThisThing(ItemNum As Range) Dim InnerPack As Range, Pkgs As Range Dim Match As Double, SumIt As Double Set InnerPack = Sheet1.Range("W5", Sheet1.Range("W5").End(xlDown)) Set Pkgs = Sheet1 D5", Sheet1.Range("D5").End(xlDown)) Match = InnerPack.Find(ItemNum.Value).Offset(0, -8).Value SumIt = Application.SumIf(InnerPack, ItemNum, Pkgs) ThisThing = Application.WorksheetFunction.RoundUp(RoundIt / Match, 0) End Function Excel Value (1) InnerPack (1) ItemNum (1) Nevermind. The last Roundit needed to change to a SUMIT and adding an AS Double behind the function seems to have done the trick on
use that fact in order to produce this perhaps more compact User Defined Function. . . Function SumIt(S As String) As Double For Each V In Split(S) SumIt = SumIt + Val(V) Next End Function - - Rick (MVP - Excel) I like this response, but I am
Name = " = ""b""" ActiveChart.Location Where: = xlLocationAsObject, Name: = "Sheet1" With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "SUMIT" .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters Name = " = ""b""" ActiveChart.Location Where: = xlLocationAsObject, Name: = "Sheet1" With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "SUMIT" .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters