Create a function to return the cell id of found text

jsmith2094

New Member
Joined
Aug 19, 2021
Messages
35
Office Version
  1. 365
Platform
  1. Windows
HI Everyone,

not sure where to start, I need to create a custom function so that if I want to search for a name, it will return the cell number that the name is located in,

so if John Smith was in A4 it would return number 4 , and if it was joe smith in cell a3 it would return number 3

any ideas ?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Any reason why you want a UDF, this can be done with a simple formula
+Fluff 1.xlsm
ACDE
1Name
2Tom PearceTom Cobley9
3Bill Brewer
4Jan Stewer
5Peter Gurney
6Peter Davy
7Dan'l Whiddon
8Harry Hawke
9Tom Cobley
Fluff
Cell Formulas
RangeFormula
E2E2=MATCH(D2,A1:A100,0)
 
Upvote 0
Any reason why you want a UDF, this can be done with a simple formula
+Fluff 1.xlsm
ACDE
1Name
2Tom PearceTom Cobley9
3Bill Brewer
4Jan Stewer
5Peter Gurney
6Peter Davy
7Dan'l Whiddon
8Harry Hawke
9Tom Cobley
Fluff
Cell Formulas
RangeFormula
E2E2=MATCH(D2,A1:A100,0)

I need it as a function for some class work ?
 
Upvote 0
In that case what have you tried?
 
Upvote 0
I'm afraid I don't do other people's homework. I will happily help correct any errors, but that's it.
Also I do not know what you have been taught, so if I gave you a UDF that used stuff you have not been taught, you'd probably get no marks, which doesn't help anybody.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top