Can a formula check for a certain value in a range?

G

Guest

I need a formula function to check if a named range contains a certain entry.
A formula similar to: IF(DATA!Dave='computer',d16,""), where DATA is the
worksheet and Dave is the named range. But, rather than '=' I need a
function that checks if the range 'contains' a single or a number of
'computer' entrys in the range. The quantity of entrys is unimportant.

The Range:
The named range is a number of rows, of which the first column is merged to
contain the name of the person the rest of the data refers to. The data can
contain numbers, text or blank cells - relevant to the column headers.

I'm sure this must be possible!!!?
 
G

Guest

You can write a custom function similar to the following:

function contains (rngnm,cmpr)

for each cl in range(rngrm)

if cl.value = cmpr then

contains=true
exit function

end if
next
end function

http://HelpExcel.com
 
J

Jack Sons

Use this formula

=IF(COUNTIF(your_range,"computer"),D16,"")

Jack Sons
The Netherlands
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top