I used a table for a header with 3 columns, aligned left, center, and right. The columns are not even, so the center column does not look centered (left and right aligned are fine).
The left column has a text box "Client Office: " + upper (ParamDisplayValue)".
The center column has a text box with "Pipeline Fees (Office)"
The right column has a text box "As Of: " + Date + " - " + Time
How can I get the three cells to have the same width so that my center cell shows correctly.
Newbie with Cognos, so not sure how to manipulate html, etc. or even if the environment at this company allows it.
TIA
EDIT: I think the reason this is an issue is that the header cells correspond to cells in the report body. There are 12 data items returned, so each header cell spans 4 body cells. The width of the first four columns is wider than any of the next four (dimensional attributes in the first four, metrics in the others), so the first header cell is wider than the other cells.
If I understand you correctly, you don't need a table inside the header. Here's what you need to do:
Select the header. Then, under Structure > Headers & Footers, select Split List Row Cell. That should make it match the columns in the list. Then, if you want to make a header cell span multiple cells in your list, you can select the header cells and merge them.
Related
I do not know if it is possible to do what I want to achieve in Excel, but I have the data that is generated in the Outline (let's assume: on the left side of the screen I have a "plus", if I press it, I have another "+" and I get to the next detailed data.
The problem is, when I ungroup it all, I have every item in column "A" and I can't make it into a PivotTable.
What I mean?
Example (you can see it in the photo).
1 "plus" - country:
[![enter image description here][1]][1]2 "plus" - city:
3 "plus" - brand of items sold
4 "plus" - exact equipment from this brand
When I ungroup it, everything is in one column and it should be - respectively - 1 "plus" - column A, 2 "plus" - column B, etc.
Is there any possibility to ungroup it according to the "pluses".
I hope there is any sollution...
Thanks
See https://www.mrexcel.com/board/threads/calculating-outline-levels-in-excel.227279/#post-1112028 copied here:
Select cell A1 of the sheet,
Do menu command Insert/Name/Define, and create a name called DetailLevel, with a formula ( in the Refers To box ) of:
=GET.CELL(28,Sheet1!A1)
( alter the sheet name Sheet1 to whatever your sheet is called )
Now in any blank column of the sheet type the formula =DetailLevel and copy down.
That will give you 1 for no indent, 2 for level 2, 3 for level 3
bring that along as data column to create pivot table
Is it possible to create a dynamic Excel Pivot Chart title that includes "(Top n)" where n = the value filter row limit selected by the user? I know the chart title can be set to the contents of a cell but am unsure how to go about determining the Top n limit selected by the user or how to add that in the cell formula. If this is possible, any assistance would be greatly appreciated. Thanks!
Max didn't work as I need the row count (n) after the user applies a value filter of Top n. However, your response steered me in the right direction and I was able to accomplish what I was looking for with ="(Top "&SUBTOTAL(103, A2:A140) &")" . Supposedly, SUBTOTAL with the first parameter set to 103 will perform a COUNTA function but ignore hidden rows. Reference: https://exceljet.net/excel-functions/excel-subtotal-function
So use max() on the range of cells and concatenate - I like the & (less typing):
=(Top &MAX(A21:A24)&")"
Just for those who don't know how top get the cell result into the title:
Select the chart title box (so it has blue corners
In the formula bar type "=" and select the cell with the contents and enter.
Data in my spreadsheet seems to be stored correctly but is displaying wrong.
Each row is displayed in the subsequent row. Row 1 data is not displayed. Row 2 data is displayed in row 1. Row 3 data is displayed in row 2, and so on. If a cell in Row 2 is double-clicked, the correct cell contents are displayed in the formula bar, while the cell contents being displayed disappear.
Also, all text appears to be vertically aligned along the top inside the cells, even though this option isn't chosen. (text appears shifted to the top of each cell)
Sorry if this seems confusing, I appreciate the help. Below is a picture of what all the text looks like, and an example of the cell/formula bar displaying different contents
The modification of the font size can indeed cause such an issue, although normally font size modification also causes row heigth update.
I would advise you to do following modifications to your macro:
Currently:
Sheet2.Rows("2:" & Rows.Count).ClearContents
Sheet2.Rows("2:" & Rows.Count).ClearFormats
Sheet2.Cells.Font.Name = "Calibri"
Sheet2.Cells.Font.Size = 11
Change it into:
Sheet2.Rows("2:" & Rows.Count).ClearContents
Sheet2.Rows("2:" & Rows.Count).ClearFormats
As you see, just drop the formatting specification.
From a list of columns incl Header names with defined widths in a separate sheet, I want to be able to reset column widths in a named sheet to follow the widths defined in the table, e.g.
Column A - Firstname width 32
Column B - Lastname width 40
Column C - Telephone width 6
Column D - Email width 36 etc
The same could be done to define row heights defined in a similar manner.
Thanks for your help
Your question is too imprecise to permit a targeted answer. A variant of the code below may present a generic solution.
Worksheets("Target").Columns(12).ColumnWidth = Worksheets("Source").Columns(3).ColumnWidth
This code has two parts. On the right, the column width is read. On the left it is set. You can do either with any column that you can specify, including the column of a named range such as you have in a table. You can assign the read value to a variable and apply the width stored in a variable to any column you can specify, including columns of named ranges like in a table or ranges you specify in your code on the fly. Note that the column widths is a numeric value of Single data type.
Note that the PasteSpecial method offers an option to copy the column width, too. And, of course, you have the command AutoFit at your disposal to adjust a column's width to whatever is needed by its contents.
This is the code for what I understood you wanted.
Sub test()
Worksheets("test").Columns("D").ColumnWidth = Worksheets("Values").Range("D4").Value
Worksheets("test").Columns("E").ColumnWidth = Worksheets("Values").Range("D5").Value
Worksheets("test").Columns("F").ColumnWidth = Worksheets("Values").Range("D6").Value
Worksheets("test").Range("D7").Value = Worksheets("Values").Range("C4").Value
Worksheets("test").Range("E7").Value = Worksheets("Values").Range("C5").Value
Worksheets("test").Range("F7").Value = Worksheets("Values").Range("C6").Value
End Sub
If you have troubles putting this together with your excel file, I will gladly help you.
I need to dynamically set the print area of a sheet (Sheet1!). Sheet1 is a summery sheet listing the content of multiple other sheets through an array formula, with content in col A:C. the number of rows are always different, so in order to have the print area height dynamically set to be according to the visible data, i entered a new name in Name Manager with this formula =OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$C:$C),3) named DynPrint. and the actual Print Area for Sheet1 I referred to =DynPrint. this should work, but the problem is that excel sees the array formula as content and therefor I'm getting 2000 rows printed out unless i'm manually resetting the print area before each print.
Thank You