I have a sheet named SymbolList in which I list stock symbols in the first column, and have row headings in the first row. I use the following sub to get stock quotes from yahoo. I developed a loop that works in steps of 200 because yahoo has a limit of 200 stock symbols that can be acquired in each request. The loop should go through the whole list in loops of 200 until the last row or if by mistake there is an empty row. The problem I face is that the loop does not work in a consistent manner, for example if I use 200 as the step limit, the sub skips all loops and only gets the last one, if I use a limit of 100 the sub skips the first loop and then proceeds, it only works well at a limit of 50.
I have a report that contains several rows of data. This data is separated by page breaks, so for example, there could be 1500 rows, separated into 90 pages by page breaks. Each range may have anywhere between 35 and 45 rows, but some of those rows may contain no data.
I would like to loop through the cells column A, look for a certain criteria, then delete the range around that certain cell that is contained within the page breaks.
I have code that will loop through the cells in column A. I also managed to create code that will delete a set range but since the ranges aren't always a uniform number of rows I need another fix.
I need to remove all existing page breaks in a document and add a page break every 72 rows. I've tried some similar codes from this forum with other functions that I don't need in it.
With Sheets("regrade pharm_standalone") For Each r In .Range("standaloneTerritory") If r.Value = "X101" Then r.EntireRow.Copy Sheets("X101").Range("A1").End(xlDown).Offset(1).PasteSpecial xlPasteValues End If Next r End With ------------------- I need to repeat this loop for values from X101 to X151. In all cases, the sheet name is equal to the value I'm looking up (eg: value = X102 goes to sheet X102).
I have a named range called 'territories' that contains the list of X101 -> X152.
I'm hoping to make the code perform the loop for each of the territories without my having to copy & paste and change the 'X101' 51 times as this would seem a rather silly thing to do!
I want some code which will automatically insert a page break every time the data changes in a column. In column B- the data is structured as below;
DOG <blank cell> <blank cell> DOG <blank cell> DOG <blank cell> <blank cell> CAT <blank cell> CAT <blank cell> MOUSE <blank cell> MOUSE MOUSE <blank cell>
Etc
The code I want would insert the page break every time every time the data changed- but not where there is a blank cell. I hope this makes sense. I realise the blank cells complicate things- the blank cells separating the data cells are there because there is additional;data in columns C,D,E etc
I have a worksheet with 760 names on it. The first row are headers, 2nd row on is the data. I need to break the data up into 25 rows a piece, excluding the headers. I am making rosters, so each roster would have twenty five names per sheet. Of course I know I will have a couple of names left over, but this would help with the bulk.
I have a spreadsheet that I need to print, but Excel automatically puts in an automatic page break every cell. I have tried all other solutions to this problem posted on this site (page setup, printer issues, etc).
I'm using the this code to print some info out of an existing worksheet and I'd like to force excel to remove all pagebreaks, as the last column or two is always printed onto another page. Does anyone know how to programatically remove pagebreaks?
how to write code to set page breaks every 4th column, or in certain intervals. For rows I have a simple .FitToPagesTall = 1, but I'm looking for something more dynamic for the columns.
I am working on a spreadsheet that has QTY discounts; all based on how much you buy of a certain Part#. The problem is that some Part#s use different QTY breaks. I am using VLOOKUP and I can only get it to show one QTY break level, and I need it to show multiple QTY breaks depending on the Part#.
Posted below is a sample of what I am working with:
I have a macro that needs to walk down a list of values and when it finds breaks in the values, it will insert a formula for a calculation. The problem I'm having is getting the code to loop correctly until it finally finds the value "End" when it should stop (when I play around with the code, sometimes I can get it to continue the loop, but it blows past "End" and then it experiences an error because it can't end.
Sheets("Master").Select Range("B1").Select ActiveCell.Offset(1, 0).Select AssetIDStartRange = ActiveCell.Address X = 0 Do ActiveCell.Offset(1, 0).Select X = X + 1 Loop Until ActiveCell.Value "" SortCriteriaName = ActiveCell.Value ActiveCell.Offset(-1, 1).Select ActiveCell.Formula = "=SUMIF($B13:$B5000," & """" & SortCriteriaName & """" & ",$H$13:$H$5000)" ActiveCell.Offset(0, -1).Select
If ActiveCell.Value "End" Then....................
I'm importing a text document into excel, and I have these page breaks that start with a c in the leftmost space(no other lines start with a character in the 1st space) and 15 spaces underneath it are page headers. I'm trying to create a macro that scans the entire A column for any "C" in the 1st leftmost space, highlight and delete(move page up) that "c" and the 15 spaces following it. I want the macro to loop until it ends.
So far, this is what I got for selecting C:
Dim c For Each c In Range("A1:A306").Cells If Left(activecell.characters.value,1)="C" Then c.Select
Changing the first row of the range to row 2, or adding the FALSE at the end makes it work. But why would it work in 2003 and not in 2007?
This is an *enormous* file, and this is just one example of a *load* of formulas that are returning errors (so far, all seem to be related to VLOOKUPs - at least the ones I've found so far). It's 25MB worth of complicated formulas, with external links to Access databases for the source data, just to give you an idea of the scope. So going through and trying to find and then change every error that might be occurring just because 2007 doesn't like it is going to be a complete disaster. You never find them all. It might be simpler to just downgrade back to 2003!
I have a macro running in Word (and referencing Excel) that is meant to iterate 15,000 times. But, after 100 times, the process slows and stalls.
I have put in a few "DoEvents" and "ActiveDocument.UndoClear" in Word, and I set "Application.EnableEvents = False" in Excel. These settings got me up to 100 iterations (previously the program would stop after even fewer )
Does anyone have any ideas or suggestions? I'm not sure what information you'd need to be informed about the problem, and I don't want to tell you too much! Do please ask if I'm not being clear.
I have attached an example Excel file that shows what I am looking for. I have one sheet with a list of parts in inventory. Each part, we'll call them A-F, has a reorder point and will automatically detect whether or not the B column should say order or not. What I want is a second sheet that will list all the parts that need to be ordered continuosly, without the breaks where parts dont need to be ordered.
want to specify page breaks and set print areas when running a macro. Appears to work sometimes, but then breaks (hard and soft) pop up on their own). Currently using something like this to specify a 2 page wide view...
ActiveSheet.PageSetup.PrintArea = "$A:$Z" With ActiveSheet.PageSetup .FitToPagesWide = 2 Set ActiveSheet.VPageBreaks(1).Location = Range("P1") End With
Can I force breaks to be more absolute (more accurately)?
I have a start time and a stop time, then a difference is calculated in cell L53. I want to subtract the time value of a break but it only works if the entered value is greater than 1:00. I tried K2-I2-L55 and It works but It wont work for times less than 1:00. I need to be able to subtract :15, :30 or any other value in cell L53.
I want to do a simple Index/Match with two collums. it works like this:
=Index(B3:B34,MATCH(A1,O3:O34,0))
But the problem is there are periodic break in those two collums that i dont want included in the function because i dont want to include those rows in any result. so i tried:
I need a formula that places a "T" next to values where the current cells time is greater than 15 minutes than the previous cells time. The times start in column D3 and I want the formulas to start in column E3.
I have a spreadsheet that I use for work that I have set the row height specifically for page breaks. I use the top 3 rows on each page as a header with that page info.
If I update it at home, then email it to work, the row height has changed. No real problem, I just go in and adjust the row height. Then if I email it back to home from work, it does the same thing.
It's just this particular sheet that does it. All of the other sheets that I use always keep their row height properties intact when emailing.
1 - While returning a msgbox, I seem to be unable to find the proper fashion of returning text, an integer or variable, and then more text. I can set the integer first with msgbox(x) & "text" Can't seem to get text, integer, then text.
2 - While returning multiple msgbox's, is it possible to make changes on the worksheet after each box? I realize this is in the middle of code which is running, so not sure if that's conceivable or not.