Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
"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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible to create one column with two different width? | Excel Worksheet Functions | |||
with same font and pixel number different column width | Setting up and Configuration of Excel | |||
Insert value of a cell as a filename | Excel Worksheet Functions | |||
Column Width Behavior | Excel Discussion (Misc queries) | |||
How to change the width on individual cells | Excel Worksheet Functions |