LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Lil Simpler

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/


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a simpler way to do this formula? Jenna Excel Worksheet Functions 5 March 1st 10 10:57 PM
VBA code simpler? mohavv Excel Discussion (Misc queries) 4 December 2nd 07 06:39 AM
Simpler Formula ... 2nd lowest value? Ken Excel Worksheet Functions 17 November 30th 06 01:41 PM
Complex formula vs. simpler GerryK Excel Worksheet Functions 3 December 6th 05 03:33 PM
Another (simpler?) printing problem Abi Excel Discussion (Misc queries) 9 January 13th 05 03:50 AM


All times are GMT +1. The time now is 04:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"