ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find a Cell Value (https://www.excelbanter.com/excel-programming/352544-find-cell-value.html)

gabe

Find a Cell Value
 
Hello,

I'm just trying to find a cell value from one sheet to another. On Sheet1, I
want say "B11" to be what I'm looking for. On Sheet2, I need it to search
through say "C1:C5001" and have it select the first one it finds. How would I
go about doing that?

Thanks

Bob Tarburton

Find a Cell Value
 
Maybe not enough information but it sounds like you want something like
=index(Sheet2!B$1:B$5001,match(your_value,Sheet2!C $1:C$5001,0))

If "your_value" is in Sheet2!C11 then the formula returns Sheet2!B11

"Gabe" wrote in message
...
Hello,

I'm just trying to find a cell value from one sheet to another. On Sheet1,
I
want say "B11" to be what I'm looking for. On Sheet2, I need it to search
through say "C1:C5001" and have it select the first one it finds. How
would I
go about doing that?

Thanks




Bob Tarburton

Find a Cell Value
 
Or perhaps you just wanted
=match(B11,Sheet2!C$1:C$5001,0)
which returns the row in Sheet2!C1:C5001 with the first exact match of B11
on Sheet1

"Bob Tarburton" wrote in message
...
Maybe not enough information but it sounds like you want something like
=index(Sheet2!B$1:B$5001,match(your_value,Sheet2!C $1:C$5001,0))

If "your_value" is in Sheet2!C11 then the formula returns Sheet2!B11

"Gabe" wrote in message
...
Hello,

I'm just trying to find a cell value from one sheet to another. On
Sheet1, I
want say "B11" to be what I'm looking for. On Sheet2, I need it to search
through say "C1:C5001" and have it select the first one it finds. How
would I
go about doing that?

Thanks






gabe

Find a Cell Value
 
Oh, I'm sorry I forgot to mention that I am trying to do this in code (VBA).
Any suggestions?

"Bob Tarburton" wrote:

Or perhaps you just wanted
=match(B11,Sheet2!C$1:C$5001,0)
which returns the row in Sheet2!C1:C5001 with the first exact match of B11
on Sheet1

"Bob Tarburton" wrote in message
...
Maybe not enough information but it sounds like you want something like
=index(Sheet2!B$1:B$5001,match(your_value,Sheet2!C $1:C$5001,0))

If "your_value" is in Sheet2!C11 then the formula returns Sheet2!B11

"Gabe" wrote in message
...
Hello,

I'm just trying to find a cell value from one sheet to another. On
Sheet1, I
want say "B11" to be what I'm looking for. On Sheet2, I need it to search
through say "C1:C5001" and have it select the first one it finds. How
would I
go about doing that?

Thanks








All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com