I have a worksheet that has header data in the first few rows, followed by a table with column headers. The header data includes parameters that are used to calculate values in the table.
What I want is to allow the user to scroll the sheet so that the header data is no longer visible but then freeze the table heading row when it becomes the first row. Then if they need to change a parameter, they can scroll back up and the top few rows come back into view.
I thought this was fairly easy to do but I can't remember how to do it. The only option I can find is the Freeze Panes option, but that freezes everything and I only want it to freeze when the header row is at the top.
Is this even possible?
Edited - To add a little more clarification, the freeze panes option freezes everything above the selected row (unless I have missed it), which is not what I am looking for. I want the sheet to behave similar to a website where there may be an ad banner at the top, followed by a navigation bar/logo/etc., then the content. As you scroll down, the ad banner moves out of view but when the nav bar is at the top, it stops and remains in view while the content continues to scroll.
Let's say I have the first 5 rows that have cells to capture input values. Then row 6 is a table heading and rows 7-100 are the table data. I want the user to be able to hit the scroll down button 5 times to move past the input values. Then I want row 6 to freeze at the top so that as the user continues scrolling, the table heading is visible. Conversely, when the user scrolls up, row 6 remains at the top until the user gets to row 7, then if they continue scrolling, the input values move into view.
Excel does something similar if you use the "format as table" function and indicate that the selection has a header row. Then when scrolling, the column headers will replace the "A", "B", "C", etc. address labels. This won't work directly for me because the table structure is a little more complex.
As far as i understood you want to keep visible a row or column thats not first. Which is kinda exotic.
If you want to hide configureables to save visual space and keep headers at all times:
Simply freeze as many rows/columns as you need for both your configs and headers. And then HIDE the rows/columns you won't want always in view.
You can even have a simple button that does this hiding and unhiding via one click:
Sub transaction1()
Rows("10:50").Hidden = Not Rows("10:50").Hidden
End Sub
As for the freeze panes, in case someone doesn't know you can freeze as many as you want. If you want to freeze columns A and B and rows 1 and 2 simply click on C3 and then use the freeze function. If you want to freeze 10 rows only - click on A11 and then use the freeze.
Though i usually just offload my service space to elsewhere and quickly jump to and from it with =HYPERLINK()
In any event your required result isn't any more convenient than the other ways you can achieve navigational ease. So if I've scrolled to row 14000 if i want to scroll back to the beginning to view my settings i still have to go through 14k rows. Having an always frozen settings area as well as headers is quicker to navigate. And if your settings area takes that much space either move it and create more compact navigations for it or simply hide/show it on demand.
There is no doubt you can have even more exotic ways to achieve the effect, but is it mandatory to do it that way?
Use this in the worksheet's code page (right-click worksheet name tab, View Code).
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim iVISROWS As Long
Dim iHDRROWS As Long
iVISROWS = 5
iHDRROWS = 3
Cells(1, 1).Resize(iHDRROWS, 1).EntireRow.Hidden = _
Target(Target.Rows.Count).Row > iVISROWS
End Sub
Optionally, take out the declaration and assignment of iVISROWS and iHDRROWS and out the following into the declaration area (top) of a module code sheet.
Option Explicit
Public Const iVISROWS As Long = 5
Public Const iHDRROWS As Long = 3
Play with the number of header rows (iHDRROWS) and the bottom of the current selection that triggers hiding the header rows (iVISROWS) untilo you get the results you are looking for.
I had the same problem and have much less tech savvy to do all the coding above.
My workaround is very simple.
Insert a new row right at the top of the sheet.
Copy the headings of the table to the new row 1 and then freeze the top row as normal.
As you scroll the top dummy row stays above your table and the rest disapears.
Your original headings still stay in place for filtering as needed if you scroll up.
Related
I have a table with dropdowns that will hide certain rows. To the right of this table, I want to have some content, but can't do this as it will be hidden when these dropdowns are selected. I currently have the content to the bottom right of the sheet and have tried splitting the screen to have them both showing but this does not work either. Any ideas on how I can have the two showing side by side? Thanks!
I've gotten around this by using Text Boxes. After creating the text box, change the properties to "do not move or size".
In the picture below, there are two text boxes.
-- The first one is just static text that you copy/paste in there. This works fine as long as you have the same info displayed all the time.
-- The second one has the ability to be somewhat dynamic, where it references the contents of another cell. That cell can be anywhere (this sheet, another sheet, doesn't matter). So in this example...
Cell L1 formula: =TEXTJOIN(CHAR(10), TRUE,E1:E3)
Textbox formula: =Sheet4!L1
No matter how you filter/hide, those text boxes won't move.
My excel sheet has a lot of rows where I go over different problems. Is there a way to create a drop down menu at the top of my sheet that can automatically take me to a specific row depending on what problem I want to look at?
I know how to create a drop down menu with all of the problem names, but I don't know how to link each name in the drop down menu to a specific row number to move the screen down.
I have a set of data that consists of a product SKU, and then the sizes as multiple columns. I need to transpose this data to list the sizes in one column (which I can do) but, each size needs to list the SKU as well which is something I can't seem to achieve with transpose. See images for an example.
Follow these steps...
1
Click on a cell to the right of your data.
On the keyboard press Alt and then while holding Alt down, press D and let go.
Now press P on the keyboard.
The ancient PivotTable Wizard should now be displayed.
2
Select Multiple Consolidation Ranges. Click on the Next button.
3
Select I will create the page fields. Click on the Next button.
4
For the Range field at the top of the dialog, select the range A1:J6. (This is your sample data.) Click on the FINISH button.
5
You will now see a PivotTable. You are going to double-click one particular cell... and this will create a new worksheet with your data transposed and normalized. That cell is the bottom-right cell of the PivotTable (at the intersection of Grand Total and Grand Total). Double-click it.
6
On the new sheet that is now displayed, delete column B and click on the little arrow in cell B1. Uncheck (Blanks) and click OK.
That's it. It seems like a lot, but it's not. It takes just a couple of seconds once you get used to it. And you can go ahead and delete the PivotTable now. And you can copy your normalized data out of the filtered rows and paste wherever you like... and then just delete that temporary sheet.
Please excuse me for the wording of the title. Not sure exactly how to word this so it's probably best to just show.
I have a list that looks like this
Name Date Updated
==== ===========
Item 1 1/1/2015
Item 2 1/2/2015
Item 3 1/3/2015
Item 2 1/4/2015
Item 3 1/5/2015
Item 1 1/6/2015
This will be an ongoing list. As items are updated they will be entered in like this. I would like to create a second sheet that gives me the last date that each item was updated. So the result based on the above table would look like this.
Name Date Updated
==== ===========
Item 1 1/6/2015
Item 2 1/4/2015
Item 3 1/5/2015
I have found a few solutions on the web that work when I first input the formula (Links below), BUT when I add more entries in the first table the results wont update or they'll show the wrong data.
Links:
http://blog.contextures.com/archives/2014/02/04/find-last-item-in-group-with-index-match/
http://www.get-digital-help.com/2014/02/07/find-last-matching-value-in-an-unsorted-list/
Thanks in advance for any help.
You can simply omit the numbers in the formula to get the whole column:
=INDEX($C:$C,MAX(($E$3=$B:$B)*MATCH(ROW($B:$B),ROW($B:$B))))
(following the formula from your second link).
You can record a macro as you do it manually one time. Then assign that macro to a button. Then click the button anytime you need the sheet updated.
Steps:
Start on a sheet other than the one with the data. Explanation in #3 below.
Start recording your macro by going to View > Macros > Record Macro. In the bottom left you'll now see a square stop button for when you want to stop recording.
Select the sheet with the data. This way the macro will always remember to select the right sheet regardless of where you are.
Select the two-column range of cells that has your data, then continue selecting a few hundred rows down, or at least well beyond where you think your data will eventually go down to.
Copy
Select the sheet where you want to have the summarized data.
Paste
Sort by name (ascending) and date (descending) all at once (rather than two operations). Do this by going to the Data tab in the ribbon and selecting the white and blue sort button that has two A's and two Z's and says "Sort".
With this pasted and sorted range still selected, remove duplicates in the name column. To do this, do not change the selection. Go to the Data tab and select Remove Duplicates.
Now your items will appear once and the date will be the most recent date.
Click the "stop recording" square blue button in the bottom left to stop recording your Macro.
You can assign this macro to a button or to a shortcut. To add a button you need to show the developer tab and then draw the button using one of the options on the developer tab. I can't remember offhand how to show the developer tab. Once you have a button, right click and assign the macro to the button.
13A. If you want to customize the macro, click ALT+F11 to get to the visual basic editor. Double click on one of the things named something like "module" on the left and you can edit your the range in your macro, for example if your data suddenly goes down 100 more rows than what you planned and you want the macro to cover it. Save with CTRL+S. The next time you run your macro, it will reflect these changes.
13B. View > Macros to edit your macro if you want to assign a shortcut key to it instead of adding a button.
Try all this with a copy of your spreadsheet so that you don't delete data by accident.
Does it work for you?
You could easily do this with a Pivot Table. Drag Item to Rows area and Dates to the Values area. Then format the values as Date, and select to return Max.
ive installed CKEditor on my website with the tabletools Plugins from here: http://ckeditor.com/addon/tabletools. Everything but the tabletool dialog works well.
For example: I have edited my table cell width to 33.333% and hit ok. A few minutes later I wanted to set a background color on that table cell, but unfortunatly the width (and all the other changes ive made in that dialog) was empty. That means that i cant make any further changes to that cell if i dont want to fill all the other again. Does anyone knows if this is intended and if their are any solutions to get the fields filled again?
I'm pretty certain that next time you (unconsciously) select different table cells than previously. Unfortunately it's not visible, because browsers render selections in tables poorly. For example selection may be extended to contain beginning of next cell and in such case you will see only selection in the first cell.
To make sure that on right click selection won't overflow current cell make sure to click in the middle of the text. Or, if you mistakenly opened dialog for two table cells (then width of first cell won't be loaded into the dialog), just set the values you want to change and editor won't reset those values which you haven't filled.