![]() |
Referencing Named Cells in Find
I have a spreadsheet that holds the following :-
Col A Col B CIO1 BB0191609 CIO2 BB0191491 CIO3 BB0198586 The values in Col B change regularly so I don't want to hardcode them. Col B line 1 is named CIO1 & Col B line 2 is named CIO2 etc. In another spreadsheet I need to find the values in Col B. I am using the following code :- iCol1 = Cells.Find(What:="=CIO1", After:=ActiveCell).Activate This isn't finding the column with BB0191609. Can anyone help ? |
Referencing Named Cells in Find
Try
iCol1 = Cells.Find(What:=Range("CI01").Value, After:=ActiveCell).Activate -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Jill1" wrote in message ... I have a spreadsheet that holds the following :- Col A Col B CIO1 BB0191609 CIO2 BB0191491 CIO3 BB0198586 The values in Col B change regularly so I don't want to hardcode them. Col B line 1 is named CIO1 & Col B line 2 is named CIO2 etc. In another spreadsheet I need to find the values in Col B. I am using the following code :- iCol1 = Cells.Find(What:="=CIO1", After:=ActiveCell).Activate This isn't finding the column with BB0191609. Can anyone help ? |
Referencing Named Cells in Find
Thanks for your help Bob, unfortunately this hasn't worked either !
Jill "Bob Phillips" wrote: Try iCol1 = Cells.Find(What:=Range("CI01").Value, After:=ActiveCell).Activate -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Jill1" wrote in message ... I have a spreadsheet that holds the following :- Col A Col B CIO1 BB0191609 CIO2 BB0191491 CIO3 BB0198586 The values in Col B change regularly so I don't want to hardcode them. Col B line 1 is named CIO1 & Col B line 2 is named CIO2 etc. In another spreadsheet I need to find the values in Col B. I am using the following code :- iCol1 = Cells.Find(What:="=CIO1", After:=ActiveCell).Activate This isn't finding the column with BB0191609. Can anyone help ? |
Referencing Named Cells in Find
iCol1 = ActiveWorkbook.Names("CIO1").RefersToRange
returns BB0191609 (the actual value of cell named "CIO1") Regards, Stefi €˛Jill1€¯ ezt Ć*rta: I have a spreadsheet that holds the following :- Col A Col B CIO1 BB0191609 CIO2 BB0191491 CIO3 BB0198586 The values in Col B change regularly so I don't want to hardcode them. Col B line 1 is named CIO1 & Col B line 2 is named CIO2 etc. In another spreadsheet I need to find the values in Col B. I am using the following code :- iCol1 = Cells.Find(What:="=CIO1", After:=ActiveCell).Activate This isn't finding the column with BB0191609. Can anyone help ? |
Referencing Named Cells in Find
Thank you so much Stefi. This works a treat
"Stefi" wrote: iCol1 = ActiveWorkbook.Names("CIO1").RefersToRange returns BB0191609 (the actual value of cell named "CIO1") Regards, Stefi €˛Jill1€¯ ezt Ć*rta: I have a spreadsheet that holds the following :- Col A Col B CIO1 BB0191609 CIO2 BB0191491 CIO3 BB0198586 The values in Col B change regularly so I don't want to hardcode them. Col B line 1 is named CIO1 & Col B line 2 is named CIO2 etc. In another spreadsheet I need to find the values in Col B. I am using the following code :- iCol1 = Cells.Find(What:="=CIO1", After:=ActiveCell).Activate This isn't finding the column with BB0191609. Can anyone help ? |
Referencing Named Cells in Find
You are welcome! Thanks for the feedback!
Stefi €˛Jill1€¯ ezt Ć*rta: Thank you so much Stefi. This works a treat "Stefi" wrote: iCol1 = ActiveWorkbook.Names("CIO1").RefersToRange returns BB0191609 (the actual value of cell named "CIO1") Regards, Stefi €˛Jill1€¯ ezt Ć*rta: I have a spreadsheet that holds the following :- Col A Col B CIO1 BB0191609 CIO2 BB0191491 CIO3 BB0198586 The values in Col B change regularly so I don't want to hardcode them. Col B line 1 is named CIO1 & Col B line 2 is named CIO2 etc. In another spreadsheet I need to find the values in Col B. I am using the following code :- iCol1 = Cells.Find(What:="=CIO1", After:=ActiveCell).Activate This isn't finding the column with BB0191609. Can anyone help ? |
All times are GMT +1. The time now is 05:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com