Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok
i need to check row A in my selection for cetain words, if the cells say specifiec things(criteria) then number to their right need to be summed. If they don't meet the criteria I need them ignored. I have so far been unsuccessful with logical functions. Also is there any I can make the answer show up in a cell? Regards --- Message posted from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=SUMIF(A1:A100,"cat",B1:B100)
=sumif(range,criteria,sum_range) This will search Col A for the word Cat and every time it finds it it will add in the value from Col B. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 00/02/03 ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission :-) ---------------------------------------------------------------------------- "ksnapp " wrote in message ... ok i need to check row A in my selection for cetain words, if the cells say specifiec things(criteria) then number to their right need to be summed. If they don't meet the criteria I need them ignored. I have so far been unsuccessful with logical functions. Also is there any I can make the answer show up in a cell? Regards --- Message posted from http://www.ExcelForum.com/ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.608 / Virus Database: 388 - Release Date: 03/03/2004 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
see i need vba code this issue is more complex. See my post title
"conditional -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
not finding your other post but maybe the following will help you (if you don't want to use application.worksheetfunction) sub foo() dim rng as range dim cell as range dim criteria as string dim ret_value criteria = "Test_value" set rng = range("A1:A100") for each cell in rng if cell.value=criteria then ret_value = ret_value + cell.offset(0,1).value end if next msgbox ret_value end sub -- Regards Frank Kabel Frankfurt, Germany see i need vba code this issue is more complex. See my post titled "conditional" --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
is there a simpler way to do this formula? | Excel Worksheet Functions | |||
VBA code simpler? | Excel Discussion (Misc queries) | |||
Simpler Formula ... 2nd lowest value? | Excel Worksheet Functions | |||
Complex formula vs. simpler | Excel Worksheet Functions | |||
Another (simpler?) printing problem | Excel Discussion (Misc queries) |