Selecting Information
Nov 8, 2008
I have a worksheet containing records of data; (by record I mean 1 row of data), i want to move selected records from one worksheet to another, based on criteria. To start with some information to help. my first record starts at cell B6 and ends at cell U6.
the only problem is I don't know how to go about selecting my last row when the last row of data will change
View 9 Replies
ADVERTISEMENT
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
Feb 11, 2010
I have created a userform that allows input of information and then deposits the information on a specific sheet. I am looking for a way to have that information not only deposited on the specific sheet it is already set to but also to another sheet based on a selection made from a combo box.
here is my current
View 5 Replies
View Related
Apr 6, 2013
Basically I am trying to create a worksheet in which everytime I input information into Sheet 1, it is copied into Sheet 2. I want to have each entry in succession on Sheet 2 such that my first entry would be on Row 2, second on Row 3, third on Row 4, etc. However, everytime I put something new in Sheet 1, it just overrides the information in Sheet 2.
Basically I type in ticket sales in sheet 1, it calculates the prices and keeps a transaction log in sheet 2. But everytime I do a new ticket sale, it just overwrites the previous transaction witht he new transaction information. I've pasted my VBA below:
Sheet 1 VBA:
Code:
Option Explicit
'Form level variables - used in more than one event
Dim intAdult As Integer
Dim intStudentSenior As Integer
Dim intBalcony As Integer
Dim intChild As Integer
Dim sngAmountDue As Single
[Code] .......
Sheet 2 code:
Private Sub cmdSummary_Click()
'Declare Variables
Dim intCount As Integer
Dim i As Integer
Dim intAdult As Integer
Dim intStudentSenior As Integer
[Code] ......
View 3 Replies
View Related
Jan 27, 2014
Imagine I have 2 columns of information that look like this:
Column A
Column B
AS
Dog
AS
Cat
AS
Hamster
FT
Fish
These are my key columns. The letters are initials of people and the animals are the pets they're responsible for.
Now, I have 3 more columns that look like this:
Column D
Column E
Column F
These columns can go on for hundreds of rows.
What I want to do is pull out the information from columns D, E and F where the initials and pet match those in the key list, then paste that elsewhere (say to columns J, K and L).
So, for instance, the first entry would be copied across because, according to the key list, AS is responsible for a Dog, but the bottom entry for AS wouldn't because he was looking after a fish, and that pet isn't listed as one of his animals in the key list (Fish is listed alongside FT). Likewise, the entry for AH wouldn't come across because AH doesn't appear on the key list at all.
View 1 Replies
View Related
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
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
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
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
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
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
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
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
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
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
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
Dec 10, 2008
i have this code ...
View 11 Replies
View Related
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
Jun 17, 2009
I have a question about selecting an entire row, and then inserting a new row. The following code will select, and then insert a new row at row 30:
View 2 Replies
View Related
Aug 15, 2009
If I select checkbox1 I want checkbox3 to be false and vice versa, thats simple enough. Everytime I click on one or the other checkboxes I have to reselect the one I want.
It takes two clicks to get a checkbox checked (True).
My listbox will be populated by both lists in the "Checkboxes" code once I select a checkbox, then reselct to repopulate.
Checkboxes:
View 5 Replies
View Related
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
View Related
Mar 28, 2012
I have 5 sheets in a workbook. After a code has run I want each sheet to be in A1 when they click on that tab (as there could be 50,000 rows on each), but when I try recording it it doesn't do it properly (Sometimes the A1 cell is active but the view is somewhere down the bottom of the sheet).
View 2 Replies
View Related
Oct 4, 2013
Cells(xrow, 3).Select --
Is there any way I can select more than one column.
I tried Cells(xrow, 3:10).Select but it gives error.
View 3 Replies
View Related
Jun 9, 2014
I have a macro that my coworker runs weekly to update info. The macro depends on data in a workbook that comes from another source who arbitrarily decides to rename things. I put into my code a 3 situation scenario.
1. If the sheet name = what it is supposed to then activate it
2. Else If the sheet name contains the word "Pivot" then activate it
3. Else load a userform that lists the worsheets in the workbook and allows the user to select the proper sheet.
The code I have is below. It works until I introduce the 3rd option. Is "Else" not the proper syntax here? Because when I run it, it jumps straight to the "Else" statement and loads the userform even if the sheet is named correctly or contains "Pivot" in its name.
Code:
Sub FindPiv()
Dim strWSName As String
Dim s As Worksheet
For Each s In ActiveWorkbook.Sheets
[Code] .......
View 6 Replies
View Related
Aug 3, 2007
how can i select the cell to the right in a macro? i want to runa command in the cell to the right of the one i'm in after a caommand has taken place there
i.e.
1st command run in col b following by selcting the col c and running another command there
View 9 Replies
View Related
Sep 9, 2007
I'm not sure why but Excel doesn't seem to like the following.
Workbooks("Bulk Forecast.xls").Worksheets("Bulk Forecast").Range("A1:C2").Copy
View 9 Replies
View Related
Mar 15, 2008
To make things simple, I have a range of A1:A10. Within this range I only need to select cells thats contain "Tax".
View 9 Replies
View Related
Apr 29, 2008
I have a line of code used to select an area to be copied and pasted somewhere else
Range("A1:" & Range("AD65536").End(xlUp).Offset(0, 0).Address).Select
however the spreadsheet that supplies the data this selects has been changed and now the last column AD is empty and so this no longer works and selects only the first row of data.
Ideally I need a way of selecting all the rows which have data in, from columns A to AD, based on recognising the last row using column N rather than the last column. I'm not sure this is possible though.
View 9 Replies
View Related
Jul 3, 2008
I wrote a Macro that select info from Worbook "A" to Workbook "B". In that Macro tha columns B:B, E:E and F:F are selected.
The problem is that the layout is not always the same so the correct columns keep shifting positions. The only thing that never changes is the "Column Label" in the first Row.
So, no matter from which column I alway have to copy: "Order Date"; "Status" and "MetofPay".
Is there anyway to tell my macro to look for those columns instead of B:B, E:E and F:F?
View 9 Replies
View Related
Jan 12, 2009
I have a form that all the salespeople use. The last thing in the process is to print the completed form to a specific printer. I recorded a macro to get the proper name of the printer but I am finding out that it records differently for each computer. Is there a way around this?
View 9 Replies
View Related