Home |
Search |
Today's Posts |
#1
|
|||
|
|||
sum "like"?
Is there a function or array that can sum anything like "001-"?
For example, I have a list of #s such as: 001-001 001-004 002-001 001-005 004-001 in a column, and the next column list values such as: $5 $7 $9 $10 $3 How can I sum everything that is like "001-"? So sum 001-001, 001-004, and 001-005? Thanks! |
#2
|
|||
|
|||
=SUMIF(A:A,"001-*",B:B)
HTH Jason Atlanta, GA -----Original Message----- Is there a function or array that can sum anything like "001-"? For example, I have a list of #s such as: 001-001 001-004 002-001 001-005 004-001 in a column, and the next column list values such as: $5 $7 $9 $10 $3 How can I sum everything that is like "001-"? So sum 001- 001, 001-004, and 001-005? Thanks! . |
#3
|
|||
|
|||
Hi Pablo,
This is not a straight forward thing. But I hope this helps. Do you now Visual Basic program. Sub Sample() Dim XXX As String Do Until IsEmpty(Range("A" & curRow + 1).Value) curRow = curRow + 1 Range("A" & curRow).Select For Each CurCell In Selection If Left(CurCell.Value, 3) = "001" Then MsgBox "OK" Else MsgBox "Not OK" End If Next Loop End Sub If you put all the numbers 001-001 etc. in A column then run the macro above. It will prompt you with Ok and Not Ok all you need to do is figure it out what cell you gonna put on the Ok and Not Ok corresponding to the number to be added. Hope it helps a bit. "Pablo" wrote: Is there a function or array that can sum anything like "001-"? For example, I have a list of #s such as: 001-001 001-004 002-001 001-005 004-001 in a column, and the next column list values such as: $5 $7 $9 $10 $3 How can I sum everything that is like "001-"? So sum 001-001, 001-004, and 001-005? Thanks! |
#4
|
|||
|
|||
worked great! Thanks!
"Jason Morin" wrote in message ... =SUMIF(A:A,"001-*",B:B) HTH Jason Atlanta, GA -----Original Message----- Is there a function or array that can sum anything like "001-"? For example, I have a list of #s such as: 001-001 001-004 002-001 001-005 004-001 in a column, and the next column list values such as: $5 $7 $9 $10 $3 How can I sum everything that is like "001-"? So sum 001- 001, 001-004, and 001-005? Thanks! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|