Automatically Delete (or Hide) Columns In Spreadsheet?

May 15, 2014

how to automatically delete (or hide) columns in a spreadsheet given a list of columns that I want to retain (or see).

These are the columns I want to retain (or see):

Name
1st Phone Number
2nd Phone
Country
Conditions
Email Address
Enrollment Status
Room not available
Roommate
Mailing address
Payment Record
Payment Status
Gender
Requested room type
Total Payments to Date
What is your meal preference?

The attached has two tabs......columns I want to retain (or see) and the raw data of all the columns.

View 1 Replies


ADVERTISEMENT

Automatically Hide Blank Rows In Spreadsheet

Jan 22, 2008

I have a spreadsheet that is linked to another spreadsheet in a workbook. The information comes from an export of an access query into a template in excel that I am using just to store the values, then I link the values to the appropriate field in another sheet. I was wondering is there a way to programmatically hide blank rows in this sheet starting at a specific row of the page.

View 4 Replies View Related

VBA Code To Hide Columns In Spreadsheet When Run?

Feb 9, 2012

I need some VBA code to hide columns in spreadsheet when run. Basically, in row 7, I've entered HIDE in the columns that I want to hide when the macro runs (i.e. columns F,J,H,I,K, O,P,R).

View 7 Replies View Related

Macro To Automatically Delete Data And Hide Rows

Dec 20, 2008

I have a spreadsheet that allows room for 35 students per period, but instead of having the teacher manually go in and delete the extra data and hide the rows, I want to create a macro that will do so.

In cell B4 the teacher will enter how many students are in their first period class. (cell C4 for second period, cell D4 for third etc...) I want the entering of the number to automatically hide the superfluous rows and delete the data in the second column for those rows. I don't want the rows to be completely deleted because another year they may have more students and need those rows back.

I have attached one of the workbooks that I need to put this macro into. I have created room for 35 students in a given period. So if they have 23 students entered into B4 (period one) I would need rows 30-41 to be hidden, and I would need the formulas in B30:B41, E30:E41, H30:H31, K30:K31 etc....deleted.

Basically the point of the formulas is the teacher will enter the total points possible on that given assignment in cell B6, E6, H6 etc....and it autofills that score down, so the teacher only enters those that missed points instead of entering in the missed ones and the 100 percent ones.

I would need those formulas to be deleted because if the assignment was out of 10 then cell B30-B41 will give students a 10, and then the class average will be computing those scores,but those students don't exist.

But if I can't get the macro to auto delete the formulas, I will just not have those formulas in there, and the teacher can enter all scores.

View 9 Replies View Related

Automatically Hide X Columns

Aug 14, 2008

I am trying to let Excel automatically hide unneeded columns. A brief description:
In this sheet one should enter a number of "projects" into cell DW7 (7,127). The maximum number of projects is 60. Each project consists of 2 columns (with already prepared formats and functions). The projects are numbered from 1 to 60 (the actual project number is in Cell G6 (6,7), I6 (6,9)...).
For this purpose I wrote the following

Sub worksheet_calculate() 'Hide columns that are not needed
Application. ScreenUpdating = False
Dim i As Integer
Dim r As Integer
i = 1
For r = 6 To 126
If Cells(6, r + i) > Cells(7, 127) Then
Columns(r).EntireColumn.Hidden = True
End If

If Cells(6, r + i) <= Cells(7, 127) Then
Columns(r).EntireColumn.Hidden = False
End If..................

View 7 Replies View Related

Automatically Hide Columns Based On Dates?

Aug 4, 2013

I am trying to automatically hide columns based on dates. I have a set of dates ranging from the beginning of August this year until the end of December 2019. I am trying to hide all columns that are at least a day ahead of the current date. Today on 8/4/13 it would show all columns up until today along with tomorrow 8/5/13.

8/1/2013
8/2/2013
8/3/2013
8/4/2013
8/5/2013

View 2 Replies View Related

Automatically Hide/Unhide Columns Based On Cell Text

Jan 10, 2009

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 13 Then Exit Sub
If InStr(Target.Value, "Other (specify in next column)") Then
Columns("N").Hidden = False
ElseIf WorksheetFunction. CountIf(Columns("M"), "Other (specify in next column)") = 0 Then
Columns("N").Hidden = True
End If
End Sub

but I have a lot of columns that I need to perform as above and I have put the code together as below

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next

If Target.Column = 13 And InStr(Target.Value, "Other (specify in next column)") Then
Columns("N").Hidden = False
ElseIf WorksheetFunction.CountIf(Columns("M"), "Other (specify in next column)") = 0 Then.................

Using the above code, when I selected more than one cell anywhere in my workbook and pressed delete I was bugging out with a runtime error 13 message. You can see from the above code that I inserted "On Error Resume Next" - this got rid of the runtime error 13 message, but now when I select more than one cell and press delete, hidden columns are incorrectly revealed in my worksheet. how I can extend the working code at the top of this posting so that it works for a number of different columns in my Worksheet i.e. without the runtime error 13 occurring and without columns being incorrectly revealed.

View 8 Replies View Related

Unable To Hide Columns/delete Values Using Combo Box

Apr 24, 2007

Using two Combo Boxes, I am trying to create an drop down outline form input sheet.

What it does is if you select the first selection in the combo box 1, then it hides certain rows, and deletes certain cells. If you select the second option in the combo box 1, it shows another combo box (2) which has another list of categories.

When I select the option 2 on the combo box 1, it unhides a bunch of rows, and activates combo box 2. However, when I try to select categories on combo box 2, each time it tries to hide/unhide rows I get this message "Unable to set the hidden property of the range class." I have no idea whats going on.

Here is my ....

View 9 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

Hide Error Value In Spreadsheet?

Apr 15, 2014

I have a simple spreadsheet to track my mileage. It has a column calculating miles driven since the last fill-up. The "miles driven" formula is simply =B4-B3 (current odometer reading minus previous odometer reading.)

Until I input my current odometer reading, the following row's "miles driven" column displays the previous odometer reading as negative value. Example:

ROW 2: Current Odometer Reading = 53,000
ROW 3: Current Odometer Reading = 53,200; Miles Driven = 200
ROW 4: Current Odometer Reading = blank (awaiting input); Miles Driven displays as -53,200
ROW 5: Current Odometer Reading = blank (awaiting input); Miles Driven = blank

How do I hide that negative value & just display a blank cell?

I know how to keep other types of error values from displaying (zero values, #DIV0!, etc.)how to hide this single pesky negative.

View 3 Replies View Related

Hide Rows In A Spreadsheet

Oct 29, 2013

I have a spreadsheet that has a range of a2 thru j62. I want to scan column B and if it is a 0, I want to hide the row and set the print area to the a2 thru j62 range and print the spreadsheet with the '0' columns hidden

View 2 Replies View Related

Password Protect/hide The Spreadsheet, Not Forms

May 17, 2007

I am making a database system that tracks student activity in my schools lab for people taking foreign language courses. I'm trying to make it so students must use the userform to manage they're checking in and out, and not be able to have any direct access to the Spreadsheet itself. Also, it would be nice if the whole Spreadsheet was hidden, invisible, and only the user forms could be seen.

View 4 Replies View Related

Searching In All Spreadsheet Automatically?

Sep 20, 2013

I have a program that creates a query of data into two different spreadsheets.I wish to create a master page that automatically searches for data in each of two spreadsheets and add them appropriately to the master page.

I get how to do such thing using vlookup to search for data in one spreadsheet, how to do that in two spreadsheet situation.Here is a formula that I am stuck on...

=IF(ISERROR(VLOOKUP(A2,Sheet1!$A$2:$B$3,2,0)),VLOOKUP(A2,Sheet2!$A$2:$B$3,2,0),VLOOKUP(A2,sheet1:$A$2:$B$3,2,0))

View 1 Replies View Related

Updating One Spreadsheet Off Of Another Automatically

Mar 6, 2006

I am trying to update 25 different spreadsheets, and have the latest row of data from each of the 25 automatically go to a 26th spreadsheet that is my summary.

My goal is anytime I add a new row of data in any of the 25, that the summary sheet gets updated automatically.

View 9 Replies View Related

Hide Ribbons Automatically

Feb 28, 2013

Is there a way I can have my file, when opened, have the ribbons along the top of the screen automatically hidden from view, and unaccessible by the user, no matter who opens the file.

If there is a way, is there also a way that a single user (the creator) be able to over-ride this, and therefore have access to the ribbons for editing purposes.

View 5 Replies View Related

Automatically Create New Row With New Entry From Different Tab / Spreadsheet?

Mar 24, 2014

I've got a master spreadsheet grabbing data from 12-13 different tabs/spreadsheets.

One of those has a table, and I was wondering:

Is it possible for the master spreadsheet to automatically add a new line every time someone adds a new line and creates a new entry in a different spreadsheet?

In other words,

If there is a table in the master spreadsheet, and someone adds a new line, is there a formula which allows the master spreadsheet to add a new line in order to autopopulate?

View 7 Replies View Related

Automatically Sort Names In Spreadsheet

Dec 31, 2012

I have a Spreadsheet with five columns. The column headings begins in rows 3 and 4(merged), these are Reg.#, Rank, First Name, Last Name and Station respectively.

The 5 row is used as a filter row. Therefore my Data Range is from A6:E505. So far I have input some data up to row 25.

Problem: Each time I input data I have to sort manually, I need a VBA Code to paste to automatically sort by Last Name even as I continue to input data in the other rows.

View 4 Replies View Related

Write A Letter Automatically From Spreadsheet

Mar 15, 2007

I have a master spreadsheet that I hold data relating to an event, the spreadsheet lists various companies names and contact details that I will need to the event and also what function they will provide by yes/no boxes. the data is currently spread all over the spreadsheet but I suppose it could be linked into some sort of simple table.

I then have to email or telex all the companies and request their assistance. Can excel automate this task? I know it can write an individual letter but could it write one message to all requesting exactly what I need that I could cut and paster to the application I would use to transmit the request?

Also when the list of Companies ends can the message move onto the next part.ie if there was a list of 4 Companies to use the message would start "Attn: Co1 / Co2 / Co3 / Co4" but if there was only 2 I would want "Attn: Co1 / Co2" only I currently get "Attn: Co1 / Co2 / /" For example

if the "catering" column and "water" column has "yes" but the "marquee" column has "no" as a check could it write "Please provide catering and water" BUT if all three columns were "yes" could it make it "Please provide catering, water and marquee" ?

View 2 Replies View Related

Hide & Show Sheets Automatically

Dec 28, 2006

I would like to be able to use the before save event to hide some sheets before the save then after unhide some sheets. So that the user carrys on with the sheets they had before saving but when the document is reopened the correct sheets are hidden.

This is what I have so far but unfortunately when you click close and then save changes it runs the before save code and then goes around in circles, reasking the user if they want to save changes

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim ws As Worksheet

Cancel = True
Application.EnableEvents = False
Sheets("Protected Content").Visible = True
For Each ws In Worksheets
If ws. Name <> "Protected Content" Then ws.Visible = False
Next ws
Me.Save
For Each ws In Worksheets
ws.Visible = True
Next ws
Sheets("Protected Content").Visible = False
Application.EnableEvents = True

End Sub

View 3 Replies View Related

Update PowerPoint Automatically When SpreadSheet Is Changed

Apr 10, 2014

I'm trying to code so that any changes made to Excel document will automatically change in PowerPoint. I have Copied and Pasted Special link so that its connected but when ever a change is made in Excel in powerpoint I get a pop up box saying I need to press update. But I want to bypass the pop up update box and have it so that powerpoint automatically updates when I change something in Excel.

This is the code I have so far. I don't know if it's right or if I am on the right track as I get a compile error saying I need a End with.

[Code] .....

View 4 Replies View Related

Automatically Extracting Information From A Cell In Different Spreadsheet

Aug 10, 2012

I use a spreadsheet (FY-2012) to track approx 700 work requests. I enter the work request number (name of the spreadsheet) in column A, which is hyperlinked to the actual work request spreadsheet. I would like to automatically fill in this cell with the information entered in cell J42 of the work request entered in column A. Cell A5 of the tracker "FY-2012" indicates Work Request "BB-12003". Cell D5 of the tracker "FY-2012" indicates the completion date. I would like to extract the completion date entered in cell "J42" of Work Request "BB-12003" and have it automatically fill in Cell D5 of the tracker "FY-2012".

View 1 Replies View Related

Automatically Add Rows To End Of Spreadsheet By Pushing Enter

Jun 1, 2006

I am making a template for my company to automatically calculate the amount of sheet metal needed for a specific job. The spreadsheet could get very long depending on how much duct is needed. Is there any way I can automatically insert rows to the end of the sheet by pressing enter after filling the last row with data, which would then move the totals down. Also, the formatting of the rows I wish to add need to be copies of the ones above.

View 3 Replies View Related

Code To Automatically Add In A Time And Date To Spreadsheet

May 18, 2007

Need the code which would allow me to create a macro where when data is added into an excel sheet, it automatically adds in the date and the time?

View 2 Replies View Related

Excel 2007 :: Automatically Transfer Columns From One Worksheet To Another In Multiple Columns?

May 4, 2013

I would like to take the data from worksheet1 and put into worksheet2 but limit the length of a list (the real spread sheet has over 100 rows and i would like them in 4 sets of 25 versus the example I provided). Is there an array or macro that would make this work (keeping the formatting)..

Excel 2007
B
C
3
Name
Company

[Code].....

View 9 Replies View Related

Automatically Hide Rows That Contain No Linked Data?

Mar 16, 2014

I have two linked workbooks, one containing a large data table, and the other containing individual worksheets that extract the data from the large table via HLOOKUP equations in each cell.

Is there a way to have Excel hide the row of a worksheet if the resulting HLOOKUP result in the cell in that row is empty? Also, if there is data in the cell, can I get Excel to automatically adjust the row height based in the incoming data and not on the HLOOKUP equation?

View 1 Replies View Related

How To Automatically Hide Rows Based On Value In Column Q

Jul 11, 2007

I am trying to implement the following:

After the user selects something using the validation list in cell F38, the macro should check in column Q in the rows 44 till 425 for "hide". For each row in which it finds "hide" the entire row should be hidden.

I have the code below but it does't work yet. It calculates for ages and afterwards only the first 2 rows of the 381 are hidden (probably because the third row is not "hide").

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As Range
Dim ThisCell As Range
Target = Range("F38")

[code].....

View 9 Replies View Related

How To Automatically Hide Rows - Based On Time

Apr 11, 2013

I have a set of 3,000 data points. The data is in one second intervals, however I am interested in seeing what the data looks like in a graph if I only had a point every minute. I have the following set up.

A B C
TIME X Y

What I want to do is to leave the first cell unhidden, and then hide the next 59. And then repeat this so I narrow the data down to one second each. I'm looking to do this multiple times, so I can create a graph each time in order to get an idea of what the data would look like if I only had a point for every minute.

Is there a macro that I could write, that would hide every cell except every 60th one? I was thinking that I could hide it based on the time. What would the code look like if my time was in 00:00:00 format? It's increasing, so I need it to hide cells that aren't equal to XX:XX:01, for example.

View 3 Replies View Related

Automatically Hide Rows Based On A Value In Column Q

Jul 11, 2007

After the user selects something using the validation list in cell F38, the macro should check in column Q in the rows 44 till 425 for "hide". For each row in which it finds "hide" the entire row should be hidden.

I have the code below but it does't work yet. It calculates for ages and afterwards only the first 2 rows of the 381 are hidden (probably because the third row is not "hide").

Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As Range
Dim ThisCell As Range
Target = Range("F38")

Set MyRange = Range("Q44:Q" & Range("Q425").End(xlUp).Row)
For Each ThisCell In MyRange
If ThisCell.Value = "hide" Then
ThisCell.EntireRow.Hidden = True
End If
Next ThisCell
End Sub

View 9 Replies View Related

Automatically Hide/Show Rows Across Worksheets

Apr 17, 2008

When I call a series of subroutines from different worksheets, ScreenUpdating = False is not working.Here is my

Private Sub Worksheet_Change(ByVal Target As Range)
With Application
.Calculation = xlManual
.EnableEvents = False
End With
If ActiveCell = "No" Then
Call Sheet3.DisableTBs
Call Sheet4.DisableTBs
Call Sheet5.DisableTBs
Call Sheet6.DisableTBs
Call Sheet8.DisableTBs
Call Sheet9.DisableTBs
Call Sheet10.DisableTBs......................

View 3 Replies View Related

Getting 15 Columns In Spreadsheet To Sort On One Columns As It Alphabetizes

Jun 10, 2014

Have a spreadsheet with 15 columns. In one of the columns is the name of the company and that column is not in alphabetical order. The city, state, zip code, business type and all the other pertinent data about that company is in the same row as the name of the company. My intent would be to put the company names in alphabetical order and keep all the company information in the same row as the company name.

View 1 Replies View Related







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