I have been using the below macro that has worked a treat, however I need it to copy as value as when it moves over some of the formulas and links go a little funny.
[Code] ......
What amendment I would make so that it pasted special as value?
I have a macro which refreshes a query when the spreadsheet is opened. This works fine when online.
However, if the user is not online, the query is unable to refresh and the macro just hangs.
Is there a code which will enable me to say " if unable to refresh then move on to the next line"?
here's the code below.
Private Sub Workbook_Open() Sheets("Houselist").Activate Selection.QueryTable.Refresh BackgroundQuery:=False Sheets("Front").Select Range("A1").Select End Sub
My OS is Windows 7. My version of Excel is 2007. I have read how to get a macro to move around a page in a relative way, but is there a way to move from page to page in a relative way as well?
1. Check cell B1 for my named regions 2. Find all citys in that region from another worksheet 3. Copy the specific details 4. Highlight the information that has just been copied and create a bar chart for comparison
Data to be picked up from "Inc 8%" sheet.
Headings are the same on both the worksheet the information is being taken from and being pasted to.
I need City, Year 1 Turnover - Year 10 Turnover data to be copied.
I would like a simple macro that would actually move a cell based on criteria. In my case it would be: In row A, if a cell starts with 'Agent Name' then that cell needs to move down one cell replacing the contents of that cell.
I want to achieve is a procedure that inserts horizontal page breaks at certain parts of the sheet where there is a cell equal to 2. Here is the code I have so far.
Sub insert_pagebreak() Dim printbreak_cell As Range Dim j As Long Dim i As Long ActiveSheet.ResetAllPageBreaks Set printbreak_cell = Range("AD1") j = 1 For i = 1 To 100 If printbreak_cell.Value = 2 Then Set ActiveSheet.HPageBreaks(j).Location = printbreak_cell j = j + 1 End If Set printbreak_cell = printbreak_cell.Offset(1, 0) Next i End Sub
Everything works until the cell value reaches a 2, and then once it goes into the If statement I get a 'Application-defined or object-defined error' at the below line.
Set ActiveSheet.HPageBreaks(j).Location = printbreak_cell.............
Currently I am using Excel 2000. I did a search and couldn't seem to find the answer I was looking for. Hopefully someone can help. It would be greatly appreciated since I have been trying to figure out how to do this for days.
I am trying to create a worksheet that will pull info from a row on one sheet to another sheet based on the name; then continue to list the info on each line afterward until there is no more of the that particular criteria. See below (this is just an example to simplify the data but would need the same process):
This would be the data on sheet 1:
Name Bonus Commision
Tom $45 $50 Mary $25 $75 Mary $30 $80 Tom $60 $50 Tom $90 $25
What I would like to do is have 2 more sheets. One would be Tom's sheet and the other would be Mary's sheet and it would look like this:
Tom's Sheet:
Tom $45 $50 Tom $60 $50 Tom $90 $25
Mary's Sheet:
Mary $25 $75 Mary $30 $80
I am not completely familiar with all of the functions in Excel and compared to you guys I am a complete novice.
Is this possible to do in Excel without using a macro?
When printing, how to automatically add a line at the bottom of each page? I don't want to make the line physically there. Just show the line in the page when printed.
I have cobbled together bits of code from around this forum to do what I need (thanks to all those I stole from!) but I'm stuck on the last bit.
I have a spreadsheet and the user types into an input box what they are looking for and the cursor moves to that position.
If the data is initially off the page when it is returned it is on the last row of the page I now see. Sometimes it may be appropriate to see data below it.
Is there anyway the found cell can always be shown about half way down the viewable page? (so that about 10 rows below are seen - obviously if the data is at the top then no movment is needed)
I tried the "ActiveWindow.SmallScroll Down:=10" but hit problems where the data was on a higher screen than the last search.
Removed screen shots - Please DO NOT use actual personal information, sample data only! - Moderator
Some of the people on this list have a second name entry on the line below their first name entry. ALL of the people on the list have an Address2 on the line below their Address1.
How would I move the second name entry into the cell next to the first name entry, and then concatenate them, and then also move the Address2 entry into the cell next to Address1 (but not concatenate these)?
I want to create a chart where I have 5 clustered columns, repeating 4 times(weeks). Each column(total invoices entered per user) has a error rate, which I would like to display as a line graph with markers. In other works, first column has its own line, second column has its own line etc. this spans the 4 weeks. When I create the chart now, ALL 5 the line markers are placed in the same one column. I can not move the line marker to sit on top of the column it is associated with.
if I wanted to slowly move a shape (small circle) in a straight line between cells R20 & W7.
The straightest line possible is by drawing an arrow line between the 2 cells.
Is there a way to then use this arrow as a guide for moving the shape?
In other words, would it make sense for the porgram to draw a transparent line between the cells, and use that line as a "path" along which to move the shape?
I am using Excel to create a parts list for a manufacturing assembly. I intend to have 6 categories (columns) for each part or instance. My problem is that the last (furthest right) entry will sometimes contain more characters than others. I want to limit the number of characters in the cells of this last column, and I have seen how to bump the remaining characters down to the next row(s) in the same column using the LEFT and MID formulas. This actually works very well for that purpose. However, I need to know how to force the next instance (row of 6 cell) to start together on the next available row.
The following images should better illustrate my question. First, I show the source data with the contents of cell F2 without further formatting. This cell contains more characters than I want making the column too wide for the printable space allowed. http://www.ozgrid.com/forum/attachme...1&d=1198374241
The next image shows the desired result with the extra characters from cell F2 moved to F3. (This data could actually fill up to 4 or 5 cells vertically.) Here, I have manually entered cells A4 through F5 for this illustration. I need to know how to automatically have A, B, C, D, & E move along with F. http://www.ozgrid.com/forum/attachme...1&d=1198374241
I need a macro that will print a hidden page that is linked to the page I have active.
It needs to be able to find the correct hidden page that corresponds to the active page because there are multilple pairs of the hidden/visible pages. The name of the hidden page is the same as the visible one with "printout" added to the end. When created, the sheet code names are sheetn and sheetm; n and m being consecutive numbers.
Why when I drag the dotted blue page break line does it sometimes break the entire doc into one page per cell ?
The doc is not wide. When I first load I can drag the break line successfully. Then I print preview... select print on both sides... boom.. goes from 4 pages to 14. Then I go back to page break view... drag the line... boom... Hundreds of pages. Even if I revert back to printing on one side it still is messed up.
How do I make this stop?? What am I doing wrong?? Office 2010
I have a worksheet that I need to be able to easily copy and paste the formula/formatting from the row above, but not the Values entered, (if any). I am using columns A to DG.
I just really need to be able to copy all the formula in these cells down - nothing exciting or fancy.
I've tried formatting as a table as per some searches and that was difficult! My column headings changed, and when I inserted a row, two of the formula's wouldn't copy down - plus the shading and borders went wonky in places.
When I view a sheet under Page Break Preview, it shows the Page numbers in the centre of the Page. While I am aware that it would not print the page number I was wondering if there is an option to remove/hide the page numbers.
I have an items list on page 2. On page 1 I want to create a drop down menu in C2 that references the list on page 2. Then when I choose an item, I want the additional information in cells D2 and E2 to come in automatically. The list on page 2 will be expanding daily, and when I expand it I can simply insert a new row so I correctly alphabatize it instead of constantly having to resort it.
With that said.... 1. How do you put in the drop down box that references information on a different sheet?
2. What is the best way to reference the information in my ever expanding situation: Index/Match, Vlookup, Lookup, or something I havent mentioned?
The report that I am trying to build relies on DCOUNTA formulas.
This report has 200 lines and 200 columns approximately. Each of these cells would be a DCOUNTA formula. I have a separate sheet, 'Criteria', where I intend to describe all of my criteria for the DCOUNTA formulas.
My problem is that for each DCOUNTA cell in my report, I have to create 2 rows and 5 columns worth of criteria information... so, for 40,000 cells to populate, I need to create a huge sheet of criteria.
So, while I could do the above, and it would take me some time, more efficient and elegant way to spend my time in order to get this report display DCOUNTA formulas?
For more context, I am trying to present information for 100 individual salespeople, monthly and year to date. For each cell, I need to tell DCOUNTA that the date needs to be comprised in the current period (2 columns), what the name of the salespeople is, and what the nature of the information is, which could be more than 2 additional columns.
I can to some degree autofill most of this, with some OFFSET magic, but its still feels like an ugly way to achieve my objective.
Move a row of work to resolved tab once column M is changed to resolved This needs to be moved to the first available line on the resolve tab The row that has just been moved from the orginating agents tab needs to be deleted and shifted up When moved to the resolved tab I want it to prepopulate where the row originated from in column N When moved to resolved tab I want it to prepopulate the date it was resolved Also the spreadsheet will be shared
I have attached a test version of the spreadsheet.
What I am trying to do is if on the (Open Project Issues) tab column F says "Closed" it will move that row to a tab called (Closed Project Issues) tab. I was trying something like this:
Sub testmove() Dim c As Long For c = ActiveSheet.UsedRange.Rows.Count To 2 Step -5 If Cells(c, 6) = "Closed" Rows(c).Cut End If Next c.......
I have a spreadsheet with when column K is Yes I need to move the data on that appropiate row to the corresponding worksheet in the same workbook. I have the button working but it moves the data in the row if No is in column K which is what I don't want. It also moves - removes the variables but I guess that is another question for another day.
I have two sheets and two listbox's(ColumnCount8) and one command button.
lstInYard rowsource is set to sheet1 lstMilled rowsorce is set to sheet3
Iam trying to cut and paste the selections in lstInYard to lstMilled as well as the corrosponding row values in sheet1 to sheet3 by using cmdMoveSelected click event.