ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Placeholder in find code (https://www.excelbanter.com/excel-programming/387379-placeholder-find-code.html)

keri

Placeholder in find code
 
Hi,

Can I use a placeholder in code to execute a find statement?

My code currently looks like this;

Set rngFound = rngToSearch.find("G25KT")

Yet the 25 is a variable number so wanted to express it something like
this;

Set rngFound = rngToSearch.find("G"& 00 & "KT")


merjet

Placeholder in find code
 
Try this:
Set rngFound = rngToSearch.find("G*KT")

Hth,
Merjet



keri

Placeholder in find code
 
Many thanks



joel

Placeholder in find code
 

Set rngFound = rngToSearch.find("G"& Cstr(VarA) & "KT")

"keri" wrote:

Hi,

Can I use a placeholder in code to execute a find statement?

My code currently looks like this;

Set rngFound = rngToSearch.find("G25KT")

Yet the 25 is a variable number so wanted to express it something like
this;

Set rngFound = rngToSearch.find("G"& 00 & "KT")




All times are GMT +1. The time now is 12:52 PM.

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