Selecting Columns

Sep 7, 2009

I have a table, that while writing a vba code I need to select the first column in the table (A) and the last column with data inj the table ( unknown which column it is). The last column might change (meaning that it sometimes column B, somestimes column Y etc...depends on the data). I need a way to select only the the first AND the last column in that table(actually it's the last column with data on that sheet). I'm sure there is must be a way I just don't know it!

View 2 Replies


ADVERTISEMENT

Selecting All Data In Specific Columns Without Selecting Adjacent Column

Mar 10, 2014

Using VBA, I need to Select A1:C14.

The problem is that A1:C14 contains blank cells, and there is also an adjacent column D that I do not want to copy.

So, UsedRegion and CurrentRegion aren't doing it for me. (It selects Column D too.)

Obviously, this is an example...the real data set is an export and varies in size.

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

Selecting Columns With Specific Titles?

May 26, 2014

I am looking for a way to select specific columns in excel that have specific characteristics in the header titles. For example, I have a very large worksheet with columns that specify the year and month (ie. "1900-8"). The years range from 1900 to 2011 and each year has "-1" to "-12" to represent the months of the year. Specifically, I am wanting to pick out all of the columns ending in "-8" (August).

View 14 Replies View Related

VBA For Selecting Multiple Nonadjacent Columns

Aug 8, 2009

in a vba module I currently have this

View 2 Replies View Related

VLOOKUP Selecting Multiple Columns?

Sep 11, 2012

i have the following table, i want my Vlookup not only get the description from Column K but to get column K , L , M City and Country as well and put them in Columns D for Description, E for City and F for Country. would this be possible with Vlookup formula or any other formula?

View 3 Replies View Related

Selecting Totals From UNHIDDEN Columns Only

Mar 27, 2009

I have a workbook that has 2 sheets; "Quote Summary" and "ECS". The "ECS" sheet contains columns "C" through "L" each of which has a total on row "27". At any time, one or several (but never All) of these columns may be unused and therefore hidden.

I would like to know if it is possible to sum the total of only those columns that are NOT hidden and display that value in cel "C15" of the "Quote_Summary" sheet.

View 9 Replies View Related

Excel 2010 :: Selecting Certain Desired Columns At Once

Dec 5, 2011

I wish to select all the cells which contain the word " Available " in column A at once . But i didn't find any option to do so using excel's Go TO Special feature.

I am using Excel 2010.

View 4 Replies View Related

Excel 2010 :: VBA Selecting Only Certain Columns In A Table

Sep 10, 2012

I have a table in columns C:J, starting in row 7. I have a macro that selects and copies the whole table (after I filter the table) and pastes to another sheet. Recently I've realized that I can only copy/paste C:I or it will mess up my formulas during the process.

This is the code I have right now, which works beautifully for the whole table:

Code:
ActiveSheet.ListObjects("Table36").Range.AutoFilter Field:=6, Criteria1:= _
"=Alan", Operator:=xlOr, Criteria2:="="
Range(ActiveSheet.ListObjects(1)).Select
Selection.Copy

What I need is to know how to copy everything in the table except column J. I can't just copy a certain range cells because the number of rows is variable. There has to be a way to modify the ActiveSheet.ListObjects("Table36") right?

Using Excel 2010.

View 2 Replies View Related

VB For Selecting Date Then Copying Next 14 Columns To Another Workbook?

Jul 17, 2014

I have an employee schedule that is a whole year. I'm trying to extract only the next two weeks worth of columns. I'll schedule it to run once a day. Some information... The calender has the dates listed in Row 2 on Sheet called Daily Schedule The 2 week calendar would be on sheet 7 called Two Week Calendar There are only weekdays on sheet 1 Daily Schedule so if there is nothing matching today's date just stop and do nothing I would like it to save the whole file when complete

I have written some of the simplest code but I don't know how to select by today's date then copy that column plus 9 to the right.

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open("C:Schedule.xlsx")

[Code]....

View 2 Replies View Related

Selecting Specific Columns From Multiple Workbook

Dec 13, 2008

I have a worksheet which is used by multiple users at the same time, at the end of the day I can have upto 10 files. The layout of all the files is the same, same number of columns and rows, the only difference would be the file name eg:Test1.xls, Test2.xls etc. information in test1.xls will not be any other file. At the end of the day, these files are emailed and saved in a particular folder.

What I need is get information from all the files saved in a particular folder and keep columns which have data. Additionally, if there is no data for any columns after combining the columns to display an alert. The final file should have information with only data in individual columns and arranged in the order such as Center 1, center 2, Center 3

Eg:test1
Column A Column B Column C.....upto 30 columns
Center 1 Center 2 center 3....upto 30 centers
1 4
2
3 5

test2.xls

Column A Column B Column C.....upto 30 columns
Center 1 Center 2 Center 3.....upto 30 centers
5

The final file will look like this

Finaltest.xls
Column A Column B Column C.....upto 30 columns
1 4 4
2 5
3 5

View 9 Replies View Related

Selecting Multiple Discontinuous Columns With Two Lines Titles

Jan 24, 2014

I have quite a long sequence of column for which the headers are all two-lines titles (with a line break). I need to copy many columns that are discontinuous, and the operation would save me a lot of time if I could select them at once. Of course, I know about selecting the columns holding CTRL, but here is the snag: as soon as a two-line title column is selected, the formula bar displays the content of the header, obviously on two lines, and I can't select any more columns. I tried many things, but nothing could solve this...

Is there anything I can do besides copying the columns one by one (which would take a long time) or renaming them?

View 1 Replies View Related

Excel 2010 :: Selecting Corresponding Values From Multiple Columns

Feb 18, 2014

I have a spreadsheet with two date/time columns 'Date1' & 'Date2'. Each date/time column has its own column with corresponding values ('Var1' & 'Var2'). These dates cover the same time period, however values for 'Var2' were collected less frequently than 'Var1'. I want ONLY the values in 'Var1' that correspond to the dates in 'Date2'

I am trying to select values from one column 'Var1' which have correlating date/time in column 'Date1' that match the dates specified in 'Date2'. Basically I need the values from 'Var1' that match the same date/time as 'Var2'

See the attached image to make it clearer..

Excel2010

Excelhelp.jpg

View 3 Replies View Related

Fill Array From Range Selecting All Rows And Some Columns

Jul 21, 2014

I want to fill an array from values in range A1:H10. I want to fill the array with all rows in range and only columns B,C and E. I have the code below so far using index function.

Is there a more direct way to select all rows from desired range to avoid the need to create an array of rows from 1 to LastRow and then use Application.Transpose(RowsArr) (in red) inside Index()?

View 3 Replies View Related

Excel VBA - Selecting Range Of Data Considering Multiple Columns

Feb 11, 2014

I would like to loop through cells row wise.

Columns which have data are A:E

modify below code to select the range from columns A to E?

[Code] ........

View 3 Replies View Related

Selecting A Range From Starting/ending Cell Rows And Columns

Feb 19, 2010

I need to accomplish selecting a range using variables for the starting cell and ending cell rows and columns.

Pseudo code (how I'd like the syntax to be, but isn't):

Worksheets(mysheet).range(startCellRow, startCellCol : endCellRow,endCellCol).Select
With Selection
...
End With

View 6 Replies View Related

Excel 2010 :: Cannot Unhide Columns By Selecting Entire Worksheet

May 29, 2012

I have Columns A to C which are hidden. I have tried to unhide these bey selecting the entire worksheet but to no avail. I am using Office 2010.

View 4 Replies View Related

Selecting Most Of A Row

Jan 20, 2009

How would i go about selecting a row to the left of any active cell. As far as column B

View 14 Replies View Related

VBA Selecting Top 3

Oct 28, 2009

I'm trying to make a macro that selects the 3 highest values and give these cells a blue backcolor. (The code should skip any blanc cells).

View 10 Replies View Related

Selecting The Right Row

Mar 6, 2007

i did write code to search for the data..and if the data has more than one record then a button will be appear to find all data that related to entered data... and user will have option to press on the select button to select the wanted recored and delete it or update it....the problem is that the select button show the selected data in the form but its not selecting the right data in the sheet. So when i click on delete button it delete the first row which has the same data that entered by the user.

for example, user wants to see all data the belong to the user "Tim", the forms will show all data related to the use Tim... but i want to delete the selected row not the first row with the name of Tim!

i learnt the code from this link [url]

here is the codes for find. find all, and select

Private Sub cmbFind_Click()

Dim strFind, FirstAddress As String 'what to find
Dim rSearch As Range 'range to search
Set rSearch = Sheet1.Range("a2", Range("a65536").End(xlUp))
strFind = Me.txt_num.Value 'what to look for
Dim f As Integer
With rSearch

View 9 Replies View Related

Selecting From A List

Dec 15, 2007

I have a table of adressess and clients with contacts ie

a,b,c,d
client,contact,address,select

in the list there are about 300 entries.

what i want is to put an S in the select column on those clients i am due to visit and then these records to be exported into say a word doc to print off so i have a list of visits i have to do with company contact and addresses

View 10 Replies View Related

Selecting Certain Values For A Sum

Jan 11, 2009

i dont use excel that often, and normally only for really stuff, so apologies, but i couldnt find a solution.

I have a spreadsheet of expenditure, with a column for a category of what was purchased, and then the amounts in the next column, arranged chronologically. eg

01/02/08 food 20.68
06/02/08 petrol 44.65
07/02/08 food 117.65

etc, with various oither columns for week nos (for averages), comments and the like.

Now I would like to do some analysis, for example the mean weekly food spend. I think this should involve checking the category column for "food", and if found, adding the adjacent cell (containing the amount spent) to the sum (and then obviously dividing by number of weeks) - but i cant work out how to do this!

View 3 Replies View Related

Selecting Max Values

Dec 31, 2009

I'm trying to create a formula that searches through a row and selects certain values. I have a list of individuals in rows followed by their 18 scores in columns. What I'm trying to do is only select the best 8 of those scores and add them together. I tried a few things but this is a little over my head.

View 5 Replies View Related

Selecting A Column

Jan 28, 2010

I need to select the whole column ABOVE the active cell. Ctrl-Shift-UpArrow is no good because it stops at the first blank cell. And selecting the whole column is no good either because when I subsequently paste into the column, it pastes in all the empty cells of the column, meaning my worksheets expands from a few hundred rows to 1 million!

Shift-Home does what I want on rows. Is there an equivalent for columns?

View 9 Replies View Related

Selecting From One Set Range To Another

Jul 11, 2014

So in my code I have two set ranges and want to select from one set range to another. The code I have now does not work because I cannot select Range("POBRF:PO"). This is the code.

[CODE]
ARow = Range("A" & Rows.Count).End(xlUp).Row
Set POBRF = Range("A1:A" & ARow)
BRow = Range("I" & Rows.Count).End(xlUp).Row
Set PO = Range("I1:I" & BRow)
Range("POBRF:PO").Select
[CODE/]

View 1 Replies View Related

Selecting Optionbutton Using VBA

Oct 4, 2008

I have two option buttons on each of five spreadsheets in my Excel workbook. Selecting the first option button enables an x to be written to a cell when that cell is clicked with the mouse. Selecting the second option button disables the writing of the x when the cell is clicked with the mouse. I have these working quite well.

My problem is that I want the second option button selected (disable writing of x) when I enter the sheet. I'm pretty certain that I need the code in Sub Worksheet_Activate() but I haven't been able to find the VBA statement to set the second option button on.

Also, unlike having the option buttons on a form, when I select the option button on the spreadsheet in Design mode I can see no property sheet indicating the name, value, etc of the option button.

View 5 Replies View Related

Selecting Ranges Using VBA

Oct 21, 2008

I have a macro that has automated 95% of a task but one thing is still evading me! If I use the keys then this is what I do:

Select cell C192
Select Shift and R-Arrow so that C192 and D192 are selected
Select Ctrl, Shift and Up Arrow so that C1:D192 are selected
Select Shift and Down Arrow so that C2:D192 are selected

View 8 Replies View Related

Selecting All Charts

Nov 26, 2008

I'm trying to find a way to select all charts in a worksheet and pasting them into a new sheet as a jpeg and can't find a way to select the charts all together as a group like if you shift click them.

I'm looking to copy and paste them as a group because they are grouped in a specific way for a report.

View 11 Replies View Related

Name A Textbox Without Selecting It

Dec 10, 2008

i have this code ...

View 11 Replies View Related

Selecting A Worksheet

May 29, 2009

The main worksheet is for buttons to select emergency type and what group should be notified. Subsequent sheets will have different sets of contacts - Col A= Name, Col B = email address, Col C = Yes/No indicator.

The basic code works great as long as the names are on the primary worksheet. When I try to point the code to a different worksheet, the result displayed in the MSGBOX is null. I did this by putting "Worksheets(Sheet2)." in front of "Columns("B")." I double checked the sheet name.

View 2 Replies View Related







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