Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default VLOOKUP or IF Function?

Is it possible to use the VLOOKUP or IF function to firstly, search a column
for a particular word, then return the corresponding values from another
column and calculate multiple values if more than one word hit is found?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default VLOOKUP or IF Function?

Carol,

A bit short on info but this looks in column A for the valkue in C1 and
then sums any corresponding values in column B.

=SUMIF(A:A,C1,B:B)

Mike

"carol" wrote:

Is it possible to use the VLOOKUP or IF function to firstly, search a column
for a particular word, then return the corresponding values from another
column and calculate multiple values if more than one word hit is found?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default VLOOKUP or IF Function?

Hi Carol,

Not sure how is your data looking like, but you can use combination of IF,
VLOOKUP, and COUNT

HTH,
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"carol" wrote:

Is it possible to use the VLOOKUP or IF function to firstly, search a column
for a particular word, then return the corresponding values from another
column and calculate multiple values if more than one word hit is found?


  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default VLOOKUP or IF Function?

Try sumproduct ..

Eg: =SUMPRODUCT((A2:A100="hit")*B2:B100)
will return the sum of numbers in col B where col A contain the key text: hit

And if the key text: hit
could be part of a text string, eg: hit man, double hit, etc
you could use instead:
=SUMPRODUCT(ISNUMBER(SEARCH("hit",A2:A100))*B2:B10 0)

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"carol" wrote:
Is it possible to use the VLOOKUP or IF function to firstly, search a column
for a particular word, then return the corresponding values from another
column and calculate multiple values if more than one word hit is found?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 751
Default VLOOKUP or IF Function?

VLOOKUP is excellent for retrieving a single value, if one occurrence
of lookup value is expected. If you expect several occurrences and
want a sum of the results you will probably need SUMIF:

=SUMIF(B2:B100,"AJ-123",D2:D100)

This formula will search column B:B for occurrences of "AJ-123" and
sum corresponding entries in D:D.

HTH
Kostis Vezerides

On Dec 10, 5:03 pm, carol wrote:
Is it possible to use the VLOOKUP or IF function to firstly, search a column
for a particular word, then return the corresponding values from another
column and calculate multiple values if more than one word hit is found?




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default VLOOKUP or IF Function?

Thanks max, that did it.

Sorry to everyone else for my info being vague!

"Max" wrote:

Try sumproduct ..

Eg: =SUMPRODUCT((A2:A100="hit")*B2:B100)
will return the sum of numbers in col B where col A contain the key text: hit

And if the key text: hit
could be part of a text string, eg: hit man, double hit, etc
you could use instead:
=SUMPRODUCT(ISNUMBER(SEARCH("hit",A2:A100))*B2:B10 0)

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"carol" wrote:
Is it possible to use the VLOOKUP or IF function to firstly, search a column
for a particular word, then return the corresponding values from another
column and calculate multiple values if more than one word hit is found?


  #7   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default VLOOKUP or IF Function?

welcome, glad you got what you were after.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"carol" wrote in message
...
Thanks max, that did it.



Reply
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
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Embedded VLOOKUP function within IF function beautyteknorth Excel Worksheet Functions 6 August 17th 06 09:31 AM
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM
how do I write a vlookup function within an iserror function so t. JBLeeds Excel Worksheet Functions 2 March 16th 05 10:30 AM
I want to use Vlookup function and AND function in a single formu. prakash Excel Worksheet Functions 3 January 25th 05 07:11 AM


All times are GMT +1. The time now is 06:11 AM.

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

About Us

"It's about Microsoft Excel"