Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Concatenation & formula results

Cameron

Me.Name = Target.Value & "apples"

Gord Dibben Excel MVP - XL97 SR2 & XL2002


On Wed, 30 Jul 2003 08:17:17 -0700, "Cameron"
wrote:

I recently was given a formula by a kind user that sets a
worksheet tab name to a cell value. I'd like to refine
this. It doesn't work if the cell value is the result of a
formula. Furthermore, I'd like to add some text to it.

i.e.

In work sheet 2, cell c4 references the value of a cell in
sheet1 (=sheet1!a1)

if a1 has 4 entered in , the sheet2!C3 will equal 4
which in turn will set the tab name to 4. I'd like to add
the "apples" to the result so that the tab name reads 4
apples. (perhaps a silly example but explanatory)

The original formula give to me:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address(False, False) = "A1" Then
On Error Resume Next
Me.Name = Target.Value
On Error GoTo 0
If Me.Name < Target.Value Then _
MsgBox Target.Value & _
" is not a valid sheet name or is a
duplicate"
End If
End Sub


Any suggestions??

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Concatenation & formula results

thanx Gord. I've been playing around with it and I'm
trying to get the tab to default to "XXX apples" if the
formula result is 0 or the cell is blank
-----Original Message-----
Cameron

Me.Name = Target.Value & "apples"

Gord Dibben Excel MVP - XL97 SR2 & XL2002


On Wed, 30 Jul 2003 08:17:17 -0700, "Cameron"


wrote:

I recently was given a formula by a kind user that sets

a
worksheet tab name to a cell value. I'd like to refine
this. It doesn't work if the cell value is the result of

a
formula. Furthermore, I'd like to add some text to it.

i.e.

In work sheet 2, cell c4 references the value of a cell

in
sheet1 (=sheet1!a1)

if a1 has 4 entered in , the sheet2!C3 will equal 4
which in turn will set the tab name to 4. I'd like to

add
the "apples" to the result so that the tab name reads 4
apples. (perhaps a silly example but explanatory)

The original formula give to me:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address(False, False) = "A1" Then
On Error Resume Next
Me.Name = Target.Value
On Error GoTo 0
If Me.Name < Target.Value Then _
MsgBox Target.Value & _
" is not a valid sheet name or is a
duplicate"
End If
End Sub


Any suggestions??

Thanks


.

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
When I enter a formula, Excel shows the formula not the results Pat Adams Excel Worksheet Functions 5 April 4th 23 11:18 AM
Concatenation Formula needed Gaffnr Excel Worksheet Functions 5 September 6th 07 09:56 AM
formula to apply concatenation to successive rows of data Devo Excel Worksheet Functions 2 July 24th 06 05:42 PM
View formula results instead of formula in 2003 version? Felicia Pickett Excel Discussion (Misc queries) 2 September 14th 05 12:14 AM
Concatenation formula loses text wrap formatting DFM Excel Discussion (Misc queries) 5 December 27th 04 01:45 PM


All times are GMT +1. The time now is 01:06 PM.

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"