Hide Tables Using VBA

Jun 12, 2008

I am after some code that will hide tables based on whether they contain certain values.

If we take the following example: ....

View 9 Replies


ADVERTISEMENT

Excel 2010 :: Creating Multiple Tables In VBA And Referring To Newly Created Tables?

Jul 1, 2013

Using Excel 2010. I'm writing a macro that sets up a workbook to be used for estimating at the beginning of a project. In the code I need to create multiple tables (formerly known as "lists") in the workbook. Then later in the code I need to refer back to those newly created tables. Currently, the code that creates the table is part of a loop that creates the table on many different worksheets. The problem of course, is that I have to name the Table, and then it won't create a table of the same name on the next sheet. Then, later in the code, I need to make adjustments to the table that was just created before looping to the next sheet.

Is there a way to create a table without giving it a constant name? Or by giving it a name that builds off of other info in the sheet? For example, I would be good with the naming the table after the sheet name: "Sheet1_Table" or such.

Code:
Sub Auto_Open()
'
Dim sht As Worksheet
If Range("A1") = 1 Then

[Code].....

View 2 Replies View Related

Query Hide State Of Column Ranger And Hide If False

Jun 18, 2009

I want to create a macro that checks whether a specified range of columns is hidden, and

a) hide them if they are not hidden, or
b) unhide them if they are hidden,

i.e. toggle the Hide state.

What method can I use to query the hidden state of a selected range of columns and return a boolean value?

View 2 Replies View Related

Hide Specific Rows In Sheet1 And Hide 5 More In Sheet2?

May 26, 2014

I have a macro in which i can enter the rows i want to hide.

If i want to hide "position 32" i have to enter the number 8 of the row. This works fine. But now if i want to hide the "position 32" from Sheet1 it also should hide the rows 4-8 from Sheet2 [Data with 32].

Or if i hide "position 34" in Sheet1 [row 10] it also should hide the rows 14-18 in Sheet2.

View 14 Replies View Related

VBA - Button Command To Auto-Hide Rows With Value HIDE

Jun 9, 2013

Sub Button294_Click()

If Sheet1.Range("A34:A94") = "HIDE" Then
For Each cell In Range("A27:A94")
If UCase(cell.Value) = "HIDE" Then
cell.EntireRow.Hidden = True
End If
End Sub

View 4 Replies View Related

Hide Columns & Hide X-axis Labels

Nov 22, 2006

I am filtering the data displayed in a chart by hiding columns. I would also like to filter the X-Axis labels by hiding columns. If I do this manually I have no problems but when I run the following macro the chart gives a reference error for the X-axis labels.

Sub ShowA2()
Application. ScreenUpdating = False
num = Sheets.Count
Sheets("X-Axis").Activate
Range(Columns(1), Columns(256)).Select
Selection.EntireColumn.Hidden = False
For a = 1 To 5
Sheets(num - a).Activate
If ActiveSheet.Name = "A2 Data" Then
Columns("A:Q").Select
Range("A10").Activate
Selection.EntireColumn.Hidden = False
Sheets("X-Axis").Activate
Columns("A:E").Select......................

View 3 Replies View Related

If A1 Is Also Found Below A1 Then HIDE Otherwise DON'T HIDE?

Dec 12, 2013

If A1 is also found below A1 (A2,A3,etc) then "HIDE" otherwise "DON'T HIDE"

I want to create a formula which finds out if a value exists below it in the same column. I could then use a filter to remove rows contain the word "HIDE" which will leave me with only rows with DON't HIDE. Then Column A will only contain unique values.How would I create a formula like this?

View 5 Replies View Related

Looking Up 2 Different Tables To Merge?

Feb 19, 2014

I am trying to merge two different databases in the next week. The problem I am running into is the name from 1 database isn't always the same on the other database.

I want to merge Database 1 with Database 2 and create a relationship with them both by using the database 2 internal #. As you can see in my table database 1 has similar names to database 2 but they are not exact. I want to match these names and have the formula on match tell me what the database 2 internal # is. I have also uploaded a sample excel doc with a note in B2.

database1
Herb Chambers Ford of Braintree
Herb Chambers Honda of Seekonk
Dimmitt St. Petersburg
Database 2 matched internal #
Database 2
Herb Chambers Ford of Braintree (Dave Dinger Ford)
Herb Chambers Honda Of Seekonk (7-FI)
Dew Cadillac (Dimmitt of St. Petersburg)
Database 2 internal #
15360
15301
25413

View 2 Replies View Related

Comparing Two Tables

Jun 10, 2008

I have one .xls file that contains an inventory list of all the products that I want.

Unfortunately this .xls file does not contain the prices for these items. I have another .xls file that contains SKU numbers and the prices related to those SKU numbers.

Is there a way to run every single SKU in the first file against the second file and, when a match is found, take the entry in the price column of the second file and place it in the first file so that my first .xls file contains all my products with prices?

I included sample data.

View 12 Replies View Related

Sumproduct Across Tables

Feb 22, 2010

I think this requires SUMPRODUCT, but can't work it out.

The attached spreadsheet should explain clearly.

View 14 Replies View Related

Combine Two Tables Together?

Apr 1, 2013

I have:

- Table 1 has ~1,600 records (name of game, meta score, user score)
- Table 2 has ~3,000 records (name of game, genre, publisher)

I want:

- Table X has ~1,600 records (name of game, meta score, user score, genre, publisher)

Basically, I want to take the genre and publish columns from Table 2, and add it to Table 1. However, I want to ignore the extra ~1,400 games that Table 2 has.

I'm nearly a complete noob when it comes to excel. Noob to the point where I don't even know what this thing is called, so I don't even know how to search for it properly! I know something can be done since there is a common column between the two (name of game).

Edit: Also, I think it'd be easier if I were able to attach my excel spreadsheets but I don't even know how to do that

View 1 Replies View Related

Lookup In Sub-tables

Aug 7, 2008

I have a table with dates that have bonuses associated with them, some times the bonues change, so i have another table with the date the bonus is effective and then the range of bonuses based on the sales of the month....

View 12 Replies View Related

Corresponding Tables To Find A Value?

Aug 22, 2013

i am trying to correspond 3 columns like:

Code:
________________________________________________________________________
points from / points to / note defined / points pupil got / his note
------------------------------------------------------------------------------------------------------------------------------
0 10 4 33 #
11 20 3 16 #
21 30 2 25 #
31 40 1 07 #
-------------------------------------------------------------------------------------------------------------------------------

Column 5 (his note) must be calculated looking at value on column 4 (points pupil got) and finding it on the intervals given by columns 1 and 2 (points from/to), and finally ascribing the value from column 3 (note defined).

View 2 Replies View Related

Filtering Tables With VBA

Dec 11, 2013

I have a worksheet with data in named tables on several sheets. Each of these tables has a column called "filter" (this is not always the same column number between sheets). The values in this column are either 0 or 1, depending on if that particular row is relevant under the book's current selections.

I'm trying to figure out the code that will take a table and filter it to show only the rows which have a 1 under the "filter" column.

View 2 Replies View Related

Sorting From One To More Tables?

Jun 8, 2014

Need to sort data from one table to other tables in diferent worksheets so I can easy print report.

for example: (i got about 40 markets to add in table, this 5 is just for e.g.)

ABCDEFGHIJ1DATEMARKETEMPTY B.FULL B.E.B. - F.B.NETOPRICEM1M2M3215.6.2014market 11500145050145004260900062000011000315.6.2014market 21600160001600042672000670000-2000415.6.2014market

[Code].....

View 9 Replies View Related

Validation Tables

Jun 14, 2007

I have validation tables in a few cells. I've unlocked them and password protected the sheet so that they couldn't be changed other than what is in the list.

What's happening is that the list is there, but the cell is also allowing an entry that is not in the drop down.

How can I protect the cell to only allow the validation list?

View 9 Replies View Related

Formula From 2 Different Tables

May 9, 2006

i entered an item (ie, Aircard5740, cost = $99.99). This specific item must be compared from the 1st table (type of phone) with 7 different columns where does it fall the same. Once found, another item will be entered, (ie, America's Choice 450, cost = $59.99) and again will be compared to the 2nd table (commission) with 7 different columns, (while still based from the 1st item), and from this 2nd table, there's the commission amount be taken. what formula can i type to get the commission from the 2nd table?

View 2 Replies View Related

Merging To Different Tables Into One

May 17, 2006

I have 2 tables in excel that i need to merge into one, Table 1 has 10 colmns and Table 2 has 7. Both tables have as column 1 a heading of Material, this is the column i need to compare as table 1 does not contain a material description field, but table 2 does, the bold headings are the key ones, but other column information is required. I have attached a sample ss to show what i am trying to do.

Table 1 Col Headings
Material
MTyp
MS
R
Clt
L/O
Created on
Created by

View 2 Replies View Related

Create Tables From XML With CSS

Jun 1, 2006

how to create tables from XML with CSS.Below are the codes....

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="feedrecipe.css"?>

<recipe_summary>

< percentages>Percentages</percentages>

<percentages>
<eggshells_heading>Eggshells</eggshells_heading>
<eggshells>5%</eggshells>
<wheat_heading>Wheat</wheat_heading>
<wheat>60%</wheat>
<sunflower_heading>Sunflower Seeds</sunflower_heading>
<sunflower>5%</sunflower>
<meat_heading>Meat and Bone Meal</meat_heading>
<meat>10%</meat>..................................

View 4 Replies View Related

Lookup From Tables

Jul 5, 2006

I am currently constructing a spreadsheet with an engineering application. There are standard size shafts that bearings must fit on. Once the design is run, i obtain a number which is usually inbetween the two standard sizes. I need the spreadsheet to select the larger one. for example, 184 must be looked up from

160
180
200
220

I need it to select 200, however and the moment using lookup function i am getting 180.

View 4 Replies View Related

Vlookup With 2 Different Tables

Sep 7, 2006

i'm building a spreadsheet where there is a list where users will input work shifts (those shift can be, for example, "M", "N", "T", "Me", "Ne", "Te"). i use two different columns to retrieve (using vlookup) values for M, N, T and Me, Ne, Te shifts. those values are in two different tables (one table for M, N, T shifts and another one for Me, Ne, Te)

for the M, N, T shifts column i use:
VLOOKUP(A1;$values.$A$1:$D$3;IF(WEEKDAY(G3)=1;4;IF(WEEKDAY(G3)=7;3;2)))

for the Me, Ne, Te shifts column i have:
IF(ISNA(VLOOKUP(A1;$values.$A$67:$D$69;IF(WEEKDAY(G3)=1;4;IF(WEEKDAY(G3)=7;3;2));0));0;VLOOKUP(A1;$values.$A$67:$D$69;IF(WEEKDAY(G3)=1;4;IF(WEEKDAY(G3)=7;3;2));0))

this seems to works fine, but only for one shift per day. the problem is that workers may work more than one shift per day. is there a simple way of, in one column, vlooking up the values for every M, N, T shift, every day ignoring any Me, Ne, Te and the opposite in the other column?

View 5 Replies View Related

Copying Multiple Tables Into One?

Oct 15, 2013

Say I have 10 tables and want to copy them into one single table. Easy right? Just copy / paste.

The restraint with copy paste is, if I make an adjustment to one of the 10 tables, it will not be reflected in the master table. I would have to recopy the table every time I make a change.

I was wondering if this there was such a function that says: "Once done copying with X table, start copying Y table, and so forth."

View 3 Replies View Related

VLookup Two Tables In Spreadsheet

Jan 18, 2014

I have a spreadsheet with two tables in it. Table 1 contains some data consisting of two columns both populated with data (where 1 = a, 2 = b, 3 = c and so on) and table 2 consists of two columns one column contains data and initially (numbers) column two is blank. Now I need a VLOOKUP that will look at the second column (red letters in the example) in table one, and where the same value (number) appears in table 2 populate the corresponding letter.
I do not wish to use filters as the table is extremely large. I have attached an example

View 4 Replies View Related

Break The Link Between Tables?

Apr 28, 2014

I copied a worksheet with a pivot table as a new worksheet. I wanted to group each pivot table differently on each worksheet, but the changes I make on one worksheet is reflected on the other. Is there a way to break the "link" between these tables?

View 2 Replies View Related

How To Reference Tables On Another Sheet

May 11, 2014

How do you reference a table on another sheet so that when you sort that original table it doesn't change the reference you made on that other sheet.

i know how to do this when i am referencing a cell. for instance if i am referencing a cell on sheet 5 and that comes out to something like =Sheet5!B2, i know that when i sort the data differently in sheet 5, that reference will know to change to =Sheet5!B18 or where ever that original reference ends up in this new sorting. but if I do =Table5[2] or something, and i sort that table differently, the reference will change to the new data in that cell and will not follow old reference through the new sort.

View 1 Replies View Related

One Spreadsheet Two Tables - Sync

Jun 24, 2014

Sync these two tables? the firs one is connected to a master sheet so when that master sheet is updated by entereing data, inserting rows or deleting them so is the table, the second table was created to hardcode data manually so it doesn't feed from the master. My problem is that if a row is inserted in the first table, the second table doesn't update that change. Is there any way to connect both?

View 2 Replies View Related

Automatically Make New Tables?

Nov 10, 2009

I got a excel file which i use to add invoices on. But these invoices are numbered and in a book.
1 book has 50 pages, i have to write the amount of $$ on it. But i made this file to enter the amount of money on the invoice. And the sheet automatically gives me the total amount of money which was earned when the book is full.

Now i was wondering if its possible to let excel somehow add 50 new lines with the same formulas used in the first 50 lines. So once line 50 has info enter, excel will add 50 new ones with the correct info(book and page numbers).

Can excel do this with some sort of macro?

View 14 Replies View Related

Combine And Sort Two Tables

Dec 1, 2009

I'm analyzing and charting performance data from two different boats. I am attempting find a way to combine the two charts into a single chart that is sorted by MPH as per my manually sorted example.

View 9 Replies View Related

Complicated Calculation Using Tables

Feb 8, 2010

I am creating a spreadsheet where I am able to track the events that our clients have been invited to AND in a separate column, I need to track who actually attended in order to get a total of how much we have allocated on each client, AND how much we actually spent, to date, on the client.

Through the help of some ExcelForum experts, I was told a pivot table would be my best bet.

Please see attached for an example of the columns on my current spreadsheet.

I need to give each event a value, so if “Jim” Says “Yes” to Golf, “yes” will equal “$400.00”. But if Jim says Yes to the Golf ($400.00), Spring Event ($100), and Executive retreat ($1400.00)” The “Yes” in those three columns will be calculated in a side column ($400+$100+$1400). Which means that the “Yes” must have a different value assigned to it, depending on which column it falls under.

The other important functions that my spreadsheet should have are as follows:

1) I need to be able to manually enter an amount, if need be, instead of a “yes’, and have the total be calculated all the same, in the total column.

2) As mentioned, I need to be able to have one column that keeps the total of how much we have allocated on that specific client (if we invite them to 4 events, and the total of the four =$2000.00, that would be our allocated amount)… but I need a separate column that holds the amount spent on the client to date (If we have “Yes” next to Golf, spa, and trip, meaning we have invited him for the three events and are prepared to spend $1000 on him, but he only accepted to the Golf, I need one column to keep the total $1000.00 and a side column to now read “250”, for example. And if in a few months he accepts to the Trip, I need to be able to track that he accepted, and the “Total Spent” should now be “750” while the “total Allocated amount” should still be $1000.00.

Is it possible to create a pivot table that meets my needs?

View 9 Replies View Related

How To Share Workbook With Tables

Feb 3, 2011

I have a workbook full of tables and pivot tables. When I try to share it tells me to convert the tables to ranges or to something about XML.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved