Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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 ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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 ?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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 ?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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 ?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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 ?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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 ?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing a named array mooresk257 Excel Discussion (Misc queries) 1 October 26th 09 08:14 PM
referencing a 3D Named Range Robert H Excel Worksheet Functions 3 January 14th 08 05:46 PM
Extracting or Referencing named cells in multiple spreadsheets Bonehead Excel Discussion (Misc queries) 3 November 27th 06 07:18 PM
Referencing Named Ranges ExcelRookie Excel Worksheet Functions 2 March 6th 06 12:50 PM
Referencing named ranges FinChase Excel Programming 1 October 4th 05 03:54 PM


All times are GMT +1. The time now is 12:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"