Split Sheet So As To Have Independent Column Widths
Oct 3, 2007
For the past 4 months I have been desperate to find a way to split my sheet so that I can determine the column widths above and below that point independently.
For example:
small width from a1-b1
but
really large width from a2-b2
I am developing a Excel gantt chat i have chosen to display the bars by the lenght of the cell because the data is also most real time so as the time reduces so will the bars however the problem comes when there is tasks being done under one above it as i cant have the cells with different widths
What would be the best way to get around it as i want to keep the almost and the appearance of the real time nature of the cell width equal to the value.
I am working with two tables in one sheet. The first table requires seven columns. Under this table, i want to have another table that has 14 columns right under it so that their widths are the same. Is this possible? It would be like having two sheets in one.
I needed to match the width a merged area of seven columns to a single column width (for row autofitting). Adding the column unit values and setting the single column to that value produced a significantly narrower width.
The documentation mentions that the column width unit is scaled to the font type and size and the absolute width is given in points.
This is set by the normal style setting in Excel Options or by VBA application.standardfontsize = 8 (in this case).
For instance, ten columns of Arial font 8 at 8.5 units you would think to be equivalent to a single column of 85 units. In points, the difference is 420 vs. 386.25, or 33.75 points.
Well, the standard character zero has a width at this setting of 4.5 points and 1 unit is 8.25 points, leaving 3.75 points for margins.
Then (10-1) margins allowances time 3.75 points resolves the difference.
Determining the margin allowances is straightforward, and reveals that the gradation with size is stepped by MS design. For instance, sizes up to 11 use 3.75 points for margins and increasing points for characters (except between 9 & 10). Sizes 12 through 18 use 5.25 points, 20 & 22 use 6.75, 24 & 26 use 8.25, etc.
I have created a table for this purpose, however I rarely use a "normal" other than 8, so I can probably use that set in programming.
I'd like to split up the rows in a worksheet based on the values in one of the columns. Also, I'd like the sheets to be named after the values in the column. I have attached example excel sheets to explain this better. I think the vlookup and Sheets.Add and ActiveSheet.Name formulas can be used but I'm not quite sure how to put them together. The actual data has about 20 columns and about 500 rows.
I would like to know if it's possible to change width of different cells in a single column? Example:
Width of cell A1 would be 10, and width of cell A2 would be 15. Can it be done? If yes how, if no damn. The reason I ask is because I trying to fit a report on one page with a chart and a month worth of data, but some cells are to long and they get cut off.
Suppose I have the following UDF, which returns the width of the column, but when the column width change (increase or decrease), the UDF is not able to recalculate the column width...what should I do? .....
I have a workbook that has a sheet called CustInvData, this sheet contains 4,421 rows of invoice transaction data for 178 customers starting on row 2 (headers on row 1). I need to split the transaction data for each customer out into a workbook template based on the customer name in column A. I need each workbook named by the customer name along with a month and year (example: Bellsouth-0911.xls), this should create 178 unique workbooks. And since we sometimes have to go back and rerun invoices for previous months, I'll need to control the month and year manually in the code.
The parsed data needs to be copied to a pre-formatted invoice template. This template has 2 sheets, Sheet1 is called 'Product Summary', this is a table that uses VLOOKUP functions to read the data in Sheet2 called 'Product Details', this is the sheet the parsed data needs to be copied to for each customer invoice. The 'Product Details' sheet has formatted rows 1 thru 11, row 11 being the header row for the data from CustInvData to be copied. So the parsed data needs to start at row 12.
Last, once the data has been copied into the 'Product Details' sheet, I need the data to be SubTotaled at each change in column J (Product) and use the 'Sum' function to add a Subtotal in column L (Retail Price) for each unique product category.
Example data below, I've simplified it (the actual data array spans from columns A to Y)
I've got a Listbox in a User form that looks at data on another spreadsheet purely for informational purposes, not to be selected. I have two problems with what it's doing:
1) There are 23 columns, of varying widths. However the listbox uses a standard width, so some items are truncated and some have too much room.
2) The data changes, and the number of rows may change from 2 to 15000. I've set the RowSource to cover the ranged from A1:W15000, but if only 2-300 lines are selected the user can't grab the scrollbar button to scroll through, but must instead use the arrow, which is rather slow.
Is there any way to set the column widths to match the data, and the Range to only go as far as the last populated row?
I need to know how to format columns in a spreadsheet. What I want to do is autofit the columns, all except for Column A; I want that want at a fixed width of 9. The code below is my attempt to do this, and it's not resulting as I wish. Stepping through the code, it performs the first part beautifully and autofits all of the columns. Where I have the line
This is the scene. Imagine 2 lists of data, each list 2 columns wide (like 2 lists of names and phone numbers). List 1 covers column A and B, List 2 covers column D and E. I want it so that on the push of a button, columns A-E are automatically resized to be just big enough for their longest content, and column C resizes so that column D is on the next page.
The general idea is that you can print the sheet, and put together the pages relating to the seperate lists.
Scenario: Two computers running Windows 7 (64-bit Professional) with Excel 2007, same processor, same hard drive, same memory, same everything except the monitors - see below
Computer 1: HP LA2006x monitor (20" viewable diagonal) @ 1600x900 resolution, 91.79 PPI Computer 2: HP LA2206x monitor (21.5" viewable diagonal) @ 1920x1080 resolution, 102.46 PPI
We have an Excel spreadsheet that the column widths on columns A through K must equal exactly 6, 1, 6, 1, 8, 1, 13, 2, 8, 1, and 35 respectively in order for the data to be imported into another program. These exact column widths are set on Computer 1 and the .xslx file is saved to a network location.
Computer 2 opens the .xslx file from the exact same network location. The column widths display as 5.86, 0.92, 5.86, 0.92, 12.84; not the exact columns listed above. So if anyone needs to export the data from Computer 2, they have to manually adjust the column widths or run a macro to auto adjust the column widths.
My question, is there anything I can do on Computer 1 or Computer 2 to make it so the column widths are saved and open correctly no matter which one is saving and which one is opening? The 20" monitor on computer 1 cannot display the 1920x1080 resolution... already tried that.
I'm after a formula or some formatting trick to split up the address in the attached sheet. As you can see, the addresses have come through from a database in one cell, instead of a separate cells for the street line and the suburb line, making it difficult to merge for mailing.
eg. the address are coming through to the merge like this;
Is it possible to create independent filters. I have data for five departments and sales for different quarters of the years. These sales for the different quarters are independent. But If I select Q1 for first department and Q2 for second department it do not give me the result that I seek i.e. sales for first department for Q1 and Sales for second department for Q2.
If the issue is not immediately clear: If I select, for example, columns B:E and group (Data -> group and outline -> group). These can be hidden/unhidden easily with the line and + button created in the process. A similar set of columns (e.g. P:S) will behave in exactly the same way. If I have grouped columns B:E however and then try to group F:H, I end up with one large group spanning B:H.
If it is possible to create these 'separate' or 'independent' adjacent groups, I'd love to know how; if not, I'd be interested to know if anyone else has found this irritating
I have a huge data which needs to be divided and distributed to team members. What i want to achieve is to split, thru macro/VB, the entries in my main file into several files, say by 50s. I attached files for reference. Whereas, the Dummy.xls is the main file and Book1 & Book2 are the desired output.
How can I make the files path independent. Lets say I have 6 workbooks, one of them having macro that connects all the six books. While working on my pc, I entered the file locations by myself. The macro runs fine.
Now I have to send the files to someone and would not like them to add their download directory at most places in the code. I want that after downloading, they have to only open the main file and press the button to run macro. How should I do that.
Right now am using this approach:-
sub main{ str 1file; set 1file = Workbooks.Open ("c:/downloads...../1stfile.xls")
I have two spreadsheets which carry the same information in three cells. Instead of just placing a link, =B2 etc., I would like to have the cells linked to each other through code.
For the one sheet I can use this with no problem, but as soon as I place this worksheet change event in the other sheet but reverse the cells references Excel gets unhappy.
Code: Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range Set rng = Target.Parent.Range("B2, M2, N2")
[Code]....
Any proper way to update a cell no matter which spreadsheet the change takes place?
Sheet1 >> change is made to cell B2 and that same value is applied to Sheet cell C4.
I need a macro that can autofill irrespective of where the source cells are. Like, this is what I want to do:
Select two cells containing a descending order such as 50, 40. Hit the hotkey and the macro should autofill the same way as double clicking the bottom right corner of the selection.
The problem is that the two source cells can be anywhere in the sheet, and autofill range isn't fixed. Essentially, I just want a keyboard shortcut for Excel's own Autofill function.
I want this macro to be rid of the mouse when I'm working on excel (it really slows me down to use the mouse every time I want to autofill).
In the attached spread sheet, i have two set of data, for two different months.Columns A to D have the value for the first month and columns F to I have the values for the second month. In the first set of Values i have the dollar value in the column "D" and in the second set of values i have the dollar value in column "F".
I want a macro, to compare these two cells and arrange the data accordingly. If both the values are the same, then both the lines corresponding to the values can remain in the same row. If one value is greater that other, then the set of values which have the lower dollar value should come to the next row. I have attachec the sample data. The lines highlighted in green is the raw data and the one in yellow is the finished data.
I currently working on an excel report that contains a sheet with the following data in one column.
GARLAND CRAIG mr 850 GARLAND CRAIG ms 850 HARTSHORNE JANE mrs 965 ROBINSON RACHEL master 3687
I would like to split the names from the title and the id number and place them in three different columns one for name,the other for title and the third for id number.Is there a formula that could do this.
The following code works fine if the data is sorted from oldest to newest. I need for it to work when the data is sorted from newest to oldest. For this to work, I would need a change that works something like this: "total1 = total1 + close_(a, 1) * a" would be "total1 = total1 + close_(a, 1) * b" with "b" incremented in the opposite direction of "a". I code very infrequently & have tried a lot of different things, searched the Internet, etc. all to no avail.
For instance, with "close" data in column "I", the data sorted as follows works with the formula "=WMA(OFFSET(I2,0,0,9,1) )" to correctly return "791.50", but the opposite sort returns the wrong number.
The correct calculation is: (807.19*9+798.38*8+793.81*7+793.06*6+776.28*5+769.48*4+773.2*3+789.01*2+793.87*1)/(9+8+7+6+5+4+3+2+1).
I'm trying to write a formula that will return the sum of multiple cells within a larger matrix, based on a number that is manually inputted into a separate table. As you can see in the top below, I have data that is grouped by both "Zone" and by individual "Stations". The Zones/Stations on the y-axis are "Start" points, while the Zones/Stations on the x-axis are "Finish" points. What I'd like to be able to do is input a Zone ID number into the bottom table (Shown as "1" below) and have the formula either return the greatest sum of "Finish" numbers. In this example, the greatest sum is 12, which is all numbers going from Station 1 and 2 in Zone 1 to Stations 1/2 in Zone 2 (3+2+4+3). In the bottom table, you'll see the "Greatest Finish" as "2", which is Zone 2. And the total from this sum is 12, as described previously. If there is a way to return either the "Total #" or "Greatest Finish" zone.
The actual matrix I am working with is much larger (150x150), and not all zones have the same amount of stations. I'm assuming this might complicate things a bit.