How To Select Range And Skip Over Hidden Columns

May 1, 2014

I have below a code that is selecting from A11 down as far as there is data and across a certain number of columns then sets a print area.

Currently the columns go A, B, JW, JX, JY, JZ, KA, KB as C through to JV are hidden. I have tried to offset the columns by 7 to see if it will select A-KB but it is selecting cells that are hidden and only selecting A-G. I need it to go past the hidden columns. Here is the code:

[Code] ......

Could I also get a code to go from A10 and move over to KB and create a range from there e.g. KB-KJ and last row from there?

View 10 Replies


ADVERTISEMENT

Select Range Of Columns And Unhide Any That Are Hidden

Dec 10, 2013

I have a macro that allows me to select a range of columns and unhide any that are hidden. I am on the sheet "Employees", but the action happens on the sheet "Enter". I can run this macro when I am on "Employees" and jumps top "Enter" and works exactly as I want it to.

Code:
Sheets("Enter").Select
Columns("B:T").Select
Selection.EntireColumn.Hidden = False
Range("M8") = Sheets("Employees").Range("B5")
Range("I7").Select

But when I try to run it as part of another macro that begins on "Employees", I get "Run-time error '1004': Select method of Range class failed", and Columns("B:T") is highlighted.

View 4 Replies View Related

Transpose Function - How To SKIP / SELECT Certain Columns?

Feb 3, 2014

I am working on a =transpose function. Pretty simple right? Well now I am trying to have it SKIP/SELECT certain columns.

I have =transpose("date!B1:T1"), but now I want to "Select A,B,D,E,F"

=TRANSPOSE(INDIRECT("date!B1:T1"),"select A,B,D,E,F,G,H,P,Q,R,S,T")

View 1 Replies View Related

How To Skip Hidden Column Cell Value Count

Jul 15, 2014

I have few column values to count. I don't want the hidden column value. In that formula the hidden value also counted. How to ignore that hidden column value count, using macro/formula.

eg:
col A - col B - col C - col D - col E - col F
Task -- ok1 -- ok2 -- no1 --- ok3 -- ok4

Col D should be hidden. Final count result should be: OK = 4; No=0

View 3 Replies View Related

Unhide Specific Column From Hidden Range Of Columns?

Jan 19, 2003

find if there is a way to unhide in one step a specific column from hidden range of columns...

Assume columns D..H are hidden, now how can I unhide column G alone or column F alone and so on.

View 6 Replies View Related

Hiding Columns: Unable To Set The Hidden Property Of The Range Class

Oct 31, 2006

I have recently tried to implement the password protect from viewing code from this site. It worked brilliant on a basic spreadsheet, but when I tried to implement it on a worksheet with links I keep getting the error:

Run-time error '1004'
Unable to set the hidden property of the Range class

View 9 Replies View Related

If Then In Macro: If S2 Is Empty The It Will Skip Down To "Columns("W:X").Select"

May 17, 2006

I have this in my Macro:............

My Macro runs fine when there is something in Cell S2 but if there is not then I get an error on "Cells(sumrownum, 19).Value = "Total" 'Column S". What I want to do is put a if then type of statement that if S2 is empty the it will skip down to "Columns("W:X").Select" and keep going with the rest of my macro.

View 6 Replies View Related

Skip Column In Select Case

Jul 7, 2007

I've been through the forum and I've got my VBA to check that columns 37, 38
and 40 are entered if column 2 = 'O'. However I just can't get it to exclude column 39 from the check! Is there a way of getting Case Else to do this or should I use an Array?

Dim rCell As Range
Dim strMessage As String
Dim RowCounter As Integer
Dim ColumnsChecked As Integer

For Each rCell In Range("B14:B5000")
RowCounter = rCell.Row
If rCell = "O" Then
For ColumnsChecked = 37 To 40
If Cells(RowCounter, ColumnsChecked).value = "" Then
Select Case ColumnsChecked
Case 37
strMessage = "COMMENTS"
Case 38
strMessage = "INVOICE NUMBER"
Case 40............................

View 4 Replies View Related

Count And Select Outcomes, Skip Duplicates

Oct 27, 2009

This code counts all cells with a value from column B1:B:10, C1:C10, D1:D10, E1:E10, F1:F10, G1:G10 and H1:H10. And then give the cells of the 3 lowest outcomes a blue backcolor. The problem is that the code also colors any duplicate outcomes. How can I let the code skip any following duplicate outcome(s)?

View 2 Replies View Related

Skip X Columns In Formula Reference When Dragging Across Columns

Nov 15, 2009

How do you make the Autofill function increment in blocks, e.g. instead of increment 1,2,3 increment 1,8,15 inthe following example: I have a 2 worksheets, one with days of the year across columns and values down rows, and another that summarises the sum of the corresponding days in weeks, so I have 365 columns in sheet 1 and 52 columns in sheet2. Everytime I update the sum range i cannot autofill it in the summary worksheet, as A1:G1 autofills to B1:H1, but I want it to increment to H1:N1.

View 3 Replies View Related

Select Range Of Columns

Jun 26, 2009

I'm in the midst of preparing a Year-To-Date (YTD) simple financial report in MS Excel.

Firstly:
I allow user to enter a number in cell A2.

Secondly:
Cells from A4 - L4 are linked from Sheet1. Cell M4 will give sum of A4:L4. Users are not allowed to change data in cells from A4 - L4. Users are only required to enter a number between 1 to 12 in cell A2. Upon update cell A2, the VBA shall sum the number of columns as entered in cell A2.

For example, if user enter 3 in cell A2 then cell M4 must give sum of A4:C4. If user enter 8 in cell A2 then cell M4 must give sum of A4:H4.

View 9 Replies View Related

Dynamic Range To Select Only Visible Columns?

May 6, 2014

I need a macro to start at cell A11 and select across 10 columns and down to the Lastrow (last row with any data).

There are hidden columns after column D so it CANNOT have any columns hardcoded except for column A.

This selection then needs to be set as a single print area to print out on 1 page. I have already set Rows 1-10 as a title area to print at the top of each page.

Code i currently have is:

[Code] .......

I just need it to now go across 10 visible columns and set as a single print area.

View 8 Replies View Related

Excel Function To Select Two Columns Based On Range?

Jul 30, 2014

Function to select two columns based on the header and the variable given.

Sample excel file attached for your ref.

Excel sample.JPG

Find the excel file in which I am looking for an formula which will look up variable in Col A for Eg USD and search the same in Row 1 and then will select COL D:E and so forth for other currency.

View 4 Replies View Related

Select Range Of Contents From Column Which Lies In Between Other Columns

Mar 24, 2013

I have a worksheet in which column A:C contains slno,name etc. Col D contains numerical data.D4:D5 is col heading. D6:D41 contains numerical data. I want to copy the data from D6:D37 only. for this i tried the following but with negative result.

1.select cell D5.
2.press F5 and enter -to goto cell D37.
3. press control and shift and up arrow to select the upper cells. Excel selects from D37 to D4 whereas i want it to be from D37:D6.selecting D6 and then press control shift and enter keys takes me to the last cell with the data in the column, ie,D41.

How can I select only the required cells so that i can copy the content.selecting the first cell and then dragging the cross is not an expected answer to solve this.

View 4 Replies View Related

LastRow Needs To Select Next VISIBLE Row (not Hidden Row)

Jul 19, 2007

I'm having a problem moving the cell cursor 2 rows down once I find my LastRow (see LastRow code below). My problem is I need to move down 2 VISIBLE Rows down and I'm running into it moving 2 Rows down whether they are Visible or Hidden? If Row 50 is my LastRow, and I have it move 2 rows down, if Row 52 is Hidden, it still moves to Row 52 which can't be seen by the user after I do my stuff to that row? I can't unhide any hidden rows for other reasons. Is there a way to have the cursor move down 2 VISIBLE Rows instead of 2 Rows regardless?

The code I use to select the LastRow is:

LastRow = Cells(4000, 8).End(xlUp).Row
I move down 2 more rows using:

Cells(LastRow + 2, 8).Select 'Then I do some stuff here for the user, so it can't be a hidden row

View 9 Replies View Related

Using Count If But Skip Columns

Jan 20, 2010

I use the formula below to sum hours in a spreadsheet:

=((((SUM(B6:AP6)+(COUNTIF(B6:AP6,"x")*12.5))+(COUNTIF(B6:AP6,"d")*12.5))+(COUNTIF(B6:AP6,"m")*12.5)) +(COUNTIF(B6:AP6,"e")*6))

I would like to be able to change the range from "B6:AP6" to something which will start with B6 but only count every 6th cell up to AP 6. I could probably place a symbol at the top of each column I wish to count if needed. If I try to simply choose every sixth cell I get an error about too many arguments for the countif function The above formula is used to add hours for various shifts (symbolized by letters). For my current need I do not need the multiplier i just need to count how many of each letter appear in every sixth cell of a row.

This may be too fancy but if one formula would work to count every 6th cell starting with B6 and give me a sum , then automatically do the same starting with B7 and count every 6th cell etc...that would be great. I am trying to sum the number of each occurrences of each shift at each of 6 locations.

View 4 Replies View Related

Auto Select 1st Non-Hidden Sheet/Worksheet

Oct 22, 2006

I use "ActiveWindow.ScrollWorkbookTabs Position:=xlFirst" to display all available sheets in a workbook. But can the worksheet of the first tab (i.e. at the far left) be automatically selected after the workbook is opened?

View 6 Replies View Related

How To Skip Columns When Dragging Formulas

Dec 3, 2013

I have 2 sheets in my excel document. The first sheet (sheet1) has student data (grade they got on a test) from C5:C35 all in 1 column. On the 'second' sheet (sheet3), I have made a profile for each student (there are 30 of them, spread out 1 per printable page). I want to take Sheet1!C5 result and put it in sheet3!D7. The formula in sheet3!D7 would just be =sheet1!C5. I want to 'drag' that formula to L7, then to T7 then to AB7 etc etc (they are all 8 columns apart), obviously not affecting any of the cells between them.

There are 12 pieces of data in sheet1 that I want to auto update in sheet3, for 30 students, so copy pasting, and adjusting the formula would take a long time.

View 7 Replies View Related

Excel Select And Copy Without Copying Hidden Rows?

Mar 7, 2012

Ok I recently ran into something in Excel that was completely unexpected. When I filter data, and select multiple rows of data, and copy and paste it.... it pastes the unfiltered rows as hidden rows! Is there a way around this without copying row by row?

View 1 Replies View Related

Using Indirect Function To Skip Columns From Different Worksheet

Feb 9, 2012

A post about skipping rows is very similar to my situation, but I'm stuck on how to translate that for columns. (Filling formulas but need to skip cells)

I'd like to transfer information from a worksheet called "Raw Data" to another sheet, skipping every 5th column. I'd like to go from "Raw Data" B12 to a new sheet C6, then from "Raw Data" G12 to D6 in the new sheet, and so forth.

I figured out that I'll need to use COLUMN()*5-13 as a component of the function, but I can't seem to figure out how to format the name of the worksheet correctly, with the ampersand and quotation marks.

This doesn't work at all, but I think it's in the ballpark...

=INDIRECT("Raw Data!"(COLUMN()*5)-13)&12)

View 3 Replies View Related

Range.select Error (SELECT METHOD OR RANGE CLASS FAILED)

Jul 23, 2008

I have this:

Private Sub CommandButton1_Click()
Worksheets("Sheet1").Activate
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
ActiveCell.PasteSpecial
End Sub
it errors to: SELECT METHOD OR RANGE CLASS FAILED

View 9 Replies View Related

Unable To Use Arrow Keys To Select Hidden Cells On A Protected Workbook

May 13, 2009

I have a problem with a spreadsheet I am working on, and I'm not sure if its something I've done, or whether its corrupted.

Basically, Column A is Hidden and not Locked in the protection tab of formatting. The other columns are Locked and not Hidden.

I used to be able to use the arrow keys to scroll through Column A, but this now doesn't seem to work. I can select the cells within column A with the mouse and I can scroll with the mouse and the scroll bars, but I can't move between the cells with the arrow keys, enter button or tab button.

Does anyone know what might be causing this, or is the workbook corrupt?

View 9 Replies View Related

Concatenate A Range Skip Blanks

May 22, 2009

I have copied the following codes to create a Function of "Concatenate a Range Skip Blanks". However, I humbly seek help to add "," in between every word and also take away the empty space when there is only 2 words are concatenated. Pls refer to my attachement for easy understanding.

View 6 Replies View Related

Value Or Not When Columns Are Hidden

Jun 15, 2014

I would like to have the cell A26 equal to "VAT" when I enter a VAT percentage and set the cell A26 to "NOVAT" or blank when the columns G:H are hidden.

View 6 Replies View Related

Copy Range To Different Worksheet But Skip If Blank And Fill In Next Row

Feb 2, 2014

I have an excel file that contains a list of all clients and want to add an "Active Client" tab within the workbook. The list indicates some active, some inactive. The "Active client" column shows an x at 1st row or if "Inactive" is left blank. I want to auto populate all "Active Clients" to a different Worksheet without having blank rows or FALSE as the result of the current formula ...

=IF('Lead Data'!B17="√",'Lead Data'!H17)

View 1 Replies View Related

Paste Into Range But Skip Protected/Locked Cells

Feb 29, 2008

I've been trying to paste formula throughout a range of cells in the same column. Trouble is, I protect some sub- total cells and don't want the formula to paste over those sub-total formulas.

If I protect the sheet and paste the formula throughout the column including the protected cells, I would get an error message.

How can I paste the new formulas without getting into trouble of the protected cells?

View 8 Replies View Related

Copy Without Hidden Columns

Jul 15, 2005

when I want to send by email I find I cannot copy these smaller sheets - every attempt at a copy will also copy the hidden columns.

How to copy a spreadsheet and NOT pick up the hidden columns?

I realise this might be nearly impossible or considered useless because no hidden columns would mean either making the copy with blank hidden columns or altering all formulas to suit a sheet which now does not have all the original columns.

View 2 Replies View Related

Selecting Hidden Columns

Mar 19, 2009

I have a worksheet that currently has columns AB to XFB hidden. I want to unhide them, so I selected column AA and then drug the mouse over to the right (toward the empty space), intending to right-click and select "unhide". I do this all the time with no problems.

However, from the instant of my drag to the right, Excel has become totally unresponsive. I see it using 25% of my quad CPUs in task manager, but there is no active memory delta and it has been sitting for over 20 minutes now.

I'd rather not lose the work I just entered, but I can't seem to get Excel to come back to life by pressing escape or clicking in the worksheet. I've noticed slowdowns before when there is a lot of actual data in the cells selected, but these columns were empty to the best of my knowledge.

View 2 Replies View Related

Maximum Hidden Columns

Oct 12, 2007

Is there a maximum amount of hidden columns within Excel? I have double-checked protection, and I have enough columns total for the action I'm attempting to do. I am using Excel 2003, and working on a rather large spreadsheet for a forecast. The basics of it is that I have macro's within buttons set-up so that users can hide columns and just view certain columns for approximately 30 columns per week and 5 weeks.
And I can run the hide macro's for up to 4 weeks at a time, but when attempting to hide the 5th week it gives me a "Run time error 1004" Unable to set the Hidden property of the Range class.

View 9 Replies View Related

Dont Sum Hidden Columns

Apr 16, 2008

I have a spreadsheet with rows as budget line item and columns for the months they occur.

I have a cell on each row (in column B) displaying the total of that row for all the months. (columns C to Z)

I want to be able to hide certain months (columns), and have the total not include those hidden columns; but the formula for the totaling cell ( "subtotal(109,C3:Z3)" ) appears to continue counting all the columsn, even the hidden ones

View 5 Replies View Related







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