Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Single quote in sheet name


Hi Experts,


I am actually wrting a program which will populate some of the cells
in sheet 1 with a formula which looks like .... "=John!A1+David!
A1+Smith!A1"

I am simply trying to add cell A1 values in various sheets which are
named as individual names.

The problem comes when some one's name is like O' RAMBO etc...

I think case the formula throws an error because formual does't
take '

Any workaround for this one?


Thanks A Lot in advance.

Regards
Ankur

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,118
Default Single quote in sheet name

Just do what Excel does if you reference that sheet from another sheet....
Double the single-quote, like this example:

ActiveCell.Formula = "='O'' RAMBO'!A1"

or...if you're reading the sheet name from the tab...
replace single-quotes with doubles...like this:
ActiveCell.Formula = "='" & Replace(Sheet4.Name, "'", "''") & "'!A1"

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"ankur" wrote in message
ps.com...

Hi Experts,


I am actually wrting a program which will populate some of the cells
in sheet 1 with a formula which looks like .... "=John!A1+David!
A1+Smith!A1"

I am simply trying to add cell A1 values in various sheets which are
named as individual names.

The problem comes when some one's name is like O' RAMBO etc...

I think case the formula throws an error because formual does't
take '

Any workaround for this one?


Thanks A Lot in advance.

Regards
Ankur



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Single quote in sheet name

Look at the formula if you create a link

='O'' RAMBO'!A6

See also
http://www.rondebruin.nl/linksum.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"ankur" wrote in message ps.com...

Hi Experts,


I am actually wrting a program which will populate some of the cells
in sheet 1 with a formula which looks like .... "=John!A1+David!
A1+Smith!A1"

I am simply trying to add cell A1 values in various sheets which are
named as individual names.

The problem comes when some one's name is like O' RAMBO etc...

I think case the formula throws an error because formual does't
take '

Any workaround for this one?


Thanks A Lot in advance.

Regards
Ankur

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Single quote in sheet name

='O'' RAMBO'!A1+....

One way of getting the right syntax for this kind of stuff is to let excel do
the heaving lifting.

Select a cell on that troublesome sheet: O' Rambo
Edit|copy
Off to an unused cell on a different sheet in the same workbook
Edit|paste special|click Paste Link

Look at how excel builds the formula for you.

(Clean up that pasted cell when you're done.)



ankur wrote:

Hi Experts,

I am actually wrting a program which will populate some of the cells
in sheet 1 with a formula which looks like .... "=John!A1+David!
A1+Smith!A1"

I am simply trying to add cell A1 values in various sheets which are
named as individual names.

The problem comes when some one's name is like O' RAMBO etc...

I think case the formula throws an error because formual does't
take '

Any workaround for this one?

Thanks A Lot in advance.

Regards
Ankur


--

Dave Peterson
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
vlookup and using single quote Bishop Excel Worksheet Functions 2 April 3rd 09 06:02 PM
Remove single quote Avadivelan TCS Excel Worksheet Functions 4 October 5th 06 03:48 PM
Leading single quote AA2e72E Excel Programming 2 May 13th 05 11:33 AM
Removing single quote from an excel sheet Hari Excel Discussion (Misc queries) 2 December 3rd 04 09:53 PM
Single quote in a where clause Poh[_2_] Excel Programming 0 July 9th 04 02:54 AM


All times are GMT +1. The time now is 09:01 AM.

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

About Us

"It's about Microsoft Excel"