Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
nopfusch
 
Posts: n/a
Default 2 Question: Coloumn width, Filename

1 How do I enter as a function the current filename or another filename
into a cell?
If I click on the cell coyaining another filename, the file should open. Is
it possible without macros, if the (another) file is in the same folder?
2 I want to display in line one, for each coloum the width, e.g. 6.33.
The nummer representing the width should - if I change the width - change
accordingly .
Possible???
Thanks
nopfusch
  #2   Report Post  
PeterAtherton
 
Posts: n/a
Default

Hi

I've written a couple of functions that will give you what you want. Copy
them into a Visual basic module in your book. (ALT+F11,Insert,Module). You
can thenuse the functions as normal.

Function fName()
Dim wb As Workbook
Set wb = ActiveWorkbook
fName = wb.Name
End Function

Enter =fname() in a cell to return the current file name.

Function ColWidth(c)
Application.Volatile
ColWidth = c.ColumnWidth
End Function

In A1 type =colwidth(A1) to return the column width in the format you want.

You could have used Excel's CELL function to return the column width to the
nearest whole number.

e.g =CELL("Width",D7)

regards
Peter



"nopfusch" wrote:

1 How do I enter as a function the current filename or another filename
into a cell?
If I click on the cell coyaining another filename, the file should open. Is
it possible without macros, if the (another) file is in the same folder?
2 I want to display in line one, for each coloum the width, e.g. 6.33.
The nummer representing the width should - if I change the width - change
accordingly .
Possible???
Thanks
nopfusch

  #3   Report Post  
nopfusch
 
Posts: n/a
Default



"PeterAtherton" wrote:

Hi

I've written a couple of functions that will give you what you want. Copy
them into a Visual basic module in your book. (ALT+F11,Insert,Module). You
can thenuse the functions as normal.

Function fName()
Dim wb As Workbook
Set wb = ActiveWorkbook
fName = wb.Name
End Function

Enter =fname() in a cell to return the current file name.

Function ColWidth(c)
Application.Volatile
ColWidth = c.ColumnWidth
End Function

In A1 type =colwidth(A1) to return the column width in the format you want.

You could have used Excel's CELL function to return the column width to the
nearest whole number.

e.g =CELL("Width",D7)

regards
Peter

Thanks, Peter
Maube I have to come back for help, but first I want to try this out.
Regards
nopfusch
















"nopfusch" wrote:

1 How do I enter as a function the current filename or another filename
into a cell?
If I click on the cell coyaining another filename, the file should open. Is
it possible without macros, if the (another) file is in the same folder?
2 I want to display in line one, for each coloum the width, e.g. 6.33.
The nummer representing the width should - if I change the width - change
accordingly .
Possible???
Thanks
nopfusch

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
Is it possible to create one column with two different width? Dave H... Excel Worksheet Functions 0 February 21st 05 05:45 PM
with same font and pixel number different column width Christian Setting up and Configuration of Excel 0 February 1st 05 04:41 PM
Insert value of a cell as a filename Ralph Howarth Excel Worksheet Functions 0 January 18th 05 12:03 AM
Column Width Behavior Kirk P. Excel Discussion (Misc queries) 1 January 11th 05 06:35 PM
How to change the width on individual cells TemporarilyConfused Excel Worksheet Functions 1 November 10th 04 07:34 PM


All times are GMT +1. The time now is 02:31 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"