Website has a URL where the last element is a number within a range (e.g. 1000 - 4000).
But the numbers are not sequential (e.g there are 100 pages, first URL ends "1001", last one ends "6000".
As shown below I set the code to cycle through every possible number:
VB:
For i = 1001 To 6000
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://(whatever)" & i _
, Destination:="(Whichever cell the output starts in)"
Not the most constructive use of the national grid.
Is there a VBA that can check whether the URL "number" is genuine before doing anything else - and move straight to the next "i" if it doesn't exist?
I am looking for a formula to count the number of valid mobile phone numbers in a list and the number of valid email address in another list, 2 different formulas.
The mobile phone number formula would count the number of indervidual mobile phone numbers in a list that contain 077 and 078 and 079.
The email formula would count the number of indervidual email addresses in a list that contain ...........@..........dot com or .............@............dot co dot uk
Both lists may contain random junk text, like in the email list some one may have entered words like 'no email address' etc.
I try to add a named range and it says name not valid!! I'm putting in jan13. Why would this not be valid. There are no other named ranges in the workbook
I have this formula =COUNTIF(WallA,D35) which works great unless the named range is deleted. Is there a way to check to see if the named range is valid in formula?
I'm trying to make a listbox that contains a list of items from ranges that differ depending on the contents of one cell.
In other words, say the contents of the cell in question is 'flower' the listbox will be populated with the range of cells containing flower names; if the cell was 'shrubs' the same listbox would be populated with the range of cells containing shrub names.
I've scoured the site, but can't find an exact query that matches mine (though I've probably missed a bunch of them).
I have seen one of your posts in which you make a graph update based on dynamic named ranges. Here is my problem, I already defined the name of my ranges as:
I am trying to create a pivot table on a new sheet names as 4x4
I am getting following error:
Error : 1004 Reference Not Valid
I am not sure where is the problem. I have generated this code by using macro recorder and just changed the source and destination of the pivot generation code.
I'm trying to draft together a simple VBA script or even =HYPERLINK string to utilize a range of cells in Excel for the To: field in an Outlook email.
I have 7 columns each with categorized for different individuals in different departments.
Instead of dealing with contact groups, I have created a spreadsheet that breaks down the departments and supplies the email address for everyone in the department.
So, what I want to do is make a link or button for each group that when it is clicked on will open a new email via outlook with all of the addresses in the appropriate range in the To: field.
Example:
Cell: A1 is the heading Cell: A2 is the link/button you would click on Range: A3:A255 would contain the addresses.
One other thing, I'm not positive if this is an issue or not...The script might need to add the customary semicolon and space after each address added to the To: field...As needed when using multiple addresses in Outlook.
Is there an easy way to identify range or cell addresses in a formula. I want to find the alphanumeric part of the address.
For example in the SUM Formula =Sum(A4:A230), I wish to separate out A4:A230 part. Or at least I want to remove the number part in the address and just want to get Sum(A:A).
Is there a function that can do this? I don't want to do this using usual string/text operations as it becomes a laborious process and has to consider all possible cases of range addresses.
I am using Excel 2010. I have been given a task at work that can save my team a lot of time if I can solve the problem. Every month, we have a spreadsheet with about 5000 rows that we have to email. In each row, there is a range that we have to email to a specific email. For example, I would have to copy and paste Range A2-R2 in the body of the email, and then email it to whatever email is in cell S2. I would then continue this for the next 5000 lines, making it a possibility that i will be sending 5000 emails manually.
I have been trying to come up with a solution through VBA that would automatically send these emails. My goal is to automatically send the Range A2-R2 to outlook email, then cell S2 into the "To" email address box, and then automatically send it. So far, i have successfully been able to send one row, but cannot figure out how to loop it for the remainder of the rows.
A couple other key points are that I have column headings as well (Range A1-R1). If possible, I want to be able to include the column headings in the email body as well. Example - first email would be range A1-R2. second email would be range A1-R1 and A3-R3, and so forth. The body of the email would also contain a standard script, such as "Please review the information below."
The goal here is to save everyone from having to send 5000+ manual emails. This would be a big boost for my team.
I created an add-in for Excel 2003 by following your site's instructions, substituting my own subroutine's name for "MyGreatMacro" (for the purposes on testing all it does is spit out a MsgBox). I then put the resulting xla file on a network drive and went through the standard process for installing an Addin :
Tools -> Addins -> Browse for the file and hit ok, check it off, etc
This works perfectly fine when i try to install on my own machine, but when I try on other user's machines I get an error message stating that the xla file is not a valid Addin. Excel's error message in this case is about as unhelpful as they come.
I have a macro that creates a new sheet and names it based off a cell value (date, MM-DD-YY), and copies a 'Template' sheet to it, values only. Every so often, two sheets need to be made with the same date. I need the right direction in creating an addition to the below code that will add an A, B, or C at the end of the sheet name if the name is already taken?
I've 1000's of website URLs which I need to open one at a time, and check if the page contains message such as 'Product not found' or 'Oops...' or 'Page not found' or 'Error'
i have a customer (im a computer tech, but excel is not my specialty) that has a weird problem with her most important file. She meant well, but tried to back up a 2.6 MB file to a floppy disk, and after it told her the disk was full, she was unable to open the file again in excel. (File Format Is Not Valid) It will, however, open in word, with the data there. Its in an unusable format, as there were 12 different worksheets (one for every month), all on the one page of MS Word. Better than nothing, but still will take weeks to reenter properly. I searched for a repair utility and had one that seemed to work, but only put a "0" in column A row 8. A far cry from what we are looking for. Ive also run a disk recovery program in the hopes of finding an older version of the file, but came up empty.
I have a textbox (on a userform) that populates into a spreadsheet. the way I have it set up the user enters a time, but omits the semicolon, and a macro adjusts the time to show the semi colon in the spreadsheet, that is working great. But what I would like to do is to use a textbox change event to force the user to enter a valid time using a 24 hour clock. I have the textbox set to accept numbers from 0 to 2400, using the textbox change event but this allows the user to enter an invalid time such as "1575" basically anthing above 59 for the last 2 digits would be invalid.
I am trying to define some variables as byte, but I want 0 to be a valid value rather than null. When there is no data, that is when I would like for the variable to be null.
Is there a way to accomplish this? In addition, I use the same variables in a loop, which are reset at the beginning of the loop. Is there a way to reset a variable without giving it a value (like 0)?
I am using the GetSaveAsFilename function to save a file. I have the filefilter as "Excel Add-In (*.xla),xla", however when I save a file this way as an add-in, then try to load that add-in, I get the following error message.
'C:Documents and SettingsUser1DesktopBook3.xla' is not a valid add-in.
Does this mean that the GetSaveAsFilename is not capable of saving a valid xla file?
i need to set the range of variables that user can add to the range.
For Example:
AA_* BB_* CC_* ABCD_*
so we accept variables STARTING with AA_ OR BB_ OR CC_ OR ABCD_. If the user enters sth else, then I want to disable the "Enter" key. (If the Cell is Empty than it is also OK!!)
If disabling the Enter key is not possible then maybe i can use Conditioning Formatting? But the question is then if i can use for single condition OR statement.
My goal to checkup/analyze our contact details database, to do that i have to manually tag the invalid entries ( blanks, 0, wrong cellphone format, x, NONE etc. ) for cellular phone field as " INVALID " and if the cellular phone format is correct we'll tag it as " VALID " ( please refer to my attach file ) i have to get this task as fast as i could and our database comprises of 200,000 imagine if i have to manually tag it even in batches i have to figure out how to automate this..but the filter function of excel seems to be lacking for me. if there's a way how to automate this with this function:
- define field to be filtered out as for this case ill define cellphone # format and tag it as " VALID " - define field to be filtered out as invalid entries ( blanks, x , 0, numbers less than 10 digits, entries that are telephone format, NONE, /// , XX, aa, @ ) or any sort of entries that are not cellphone format
I have a large spreadsheet that has thousands of hyperlinks that I would like to check periodically to make sure they are up to date. I have found dozens of examples of VBA code that will do this for me and seemingly very clear instructions on how to do it (for example this), but haven't yet been able to successfully run anything in my spreadsheet. It either doesn't do anything, or I get an error message of a bad file name.
I successfully created two PivotTables two days ago, but when I added more rows of data to the source worksheet I could not refresh either PivotTable view. So after much frustration, I deleted both worksheets and again tried to create a new PivotTable using the wizard. I keep getting this error, and have no idea what it is telling me so that I can go about fixing it:
"The PivotTable field name is not valid. To create a PivotTable report, you must use data that is organized as a list with labeled columns. If you are changing the name of a PivotTable field, you must type a new name for the field."
I am using EXCEL 2007. When I refresh the individual pivot tables, I don't get any error. But when I click on Refresh all Pivot, I get a Reference if not valid error. The source for my pivot is referencing to another workbook. Why is there this error and how can I resolve it?
I was wanting to use an IF Then statement to check if numberes entered into cells in Sheet1 were valid numbers in another sheet. The valid numbers will not always be consecutive.