how to create function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I create a function to pick out a selection of numbers that is
greater than 900,000,000?

How can I create a function to pick out the second letter of a last name if
the second letter is an "f"?

How can I create a function to pick out a name if the name does not contain
a lastname, first initial of the first name?
 
For the first function, you could write something similar to the following:

public function numFind(rng as range)
for each cl in rng.cells
if cl.value >900000000 then
iCount=iCount+1
end if
next
numFind = iCount
end function
 
For the first question: =COUNTIF(A1:A100,">900000000")

For the second question: =IF(LEFT(A1,2)="f",LEFT(A1,2),"")

I don't understand the third question.

Dave
 

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

Back
Top