Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default Named sheet to change Cells names

Situation is really tricky for me, (D;E) 4 in one peace, and i need it to be
named as my sheet but not fully, Sheet name is T 060_esik (and "esik" part
needs transport into cell D;E4) is it possible?

I guess i explained correctly! Thnx
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default Named sheet to change Cells names

Let's assume that your sheetname hastwo parts separated by an underscore.
The following UDF will return the part following that undersco

Function sname(r As Range)
Application.Volatile
sname = Split(r.Parent.Name, "_")(1)
End Function

So if the sheetname is qwerty_asdf
=sname(A1)
will display:
asdf
--
Gary''s Student - gsnu200736


"Skrapik" wrote:

Situation is really tricky for me, (D;E) 4 in one peace, and i need it to be
named as my sheet but not fully, Sheet name is T 060_esik (and "esik" part
needs transport into cell D;E4) is it possible?

I guess i explained correctly! Thnx

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default Named sheet to change Cells names

DAMn... sorry but i dont get it.. is that macro? And whats UDF =)

Function sname(r As Range)
Application.Volatile
sname = Split(r.Parent.Name, "_")(1)
End Function

Where should i add this?


"Gary''s Student" wrote:

Let's assume that your sheetname hastwo parts separated by an underscore.
The following UDF will return the part following that undersco

Function sname(r As Range)
Application.Volatile
sname = Split(r.Parent.Name, "_")(1)
End Function

So if the sheetname is qwerty_asdf
=sname(A1)
will display:
asdf
--
Gary''s Student - gsnu200736


"Skrapik" wrote:

Situation is really tricky for me, (D;E) 4 in one peace, and i need it to be
named as my sheet but not fully, Sheet name is T 060_esik (and "esik" part
needs transport into cell D;E4) is it possible?

I guess i explained correctly! Thnx

  #4   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Named sheet to change Cells names

"Skrapik" wrote:
DAMn... sorry but i dont get it.. is that macro? And whats UDF =)


Think UDF = User Defined Function

To implement GS' UDF, try these steps:

Copy the UDF from GS' post
Press Alt+F11 to go to VBE
Click Insert Module
Right-click paste into the code window (the empty space on the right)

Press Alt+Q to get back to Excel

In Excel, in a sheet named as, say: My_Gosh
place in say B1: =sname(A1)
B1 will return: Gosh

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
Can I change the names of multiple cells at once? shadestreet Excel Discussion (Misc queries) 8 May 31st 06 12:55 AM
how can I imbed sheet names contained in cells into formulas? Ted Excel Worksheet Functions 2 March 8th 06 09:56 PM
same Named cells in different sheet Pierre Excel Discussion (Misc queries) 5 August 19th 05 08:16 AM
when you sort named cells, the names do not follow the values Claude38 Excel Discussion (Misc queries) 1 August 16th 05 10:43 PM
How do I change the names of the cells or columns from "A" to wha. Jeanne New Users to Excel 1 January 7th 05 03:10 AM


All times are GMT +1. The time now is 10:31 PM.

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"