I know this is a mess - I am just learning how to create UDFs. I am trying to extract first and last name from an email address is this format - John.Smith@abc.com. This is what I have and of course it does not respond . .
I have 3 UDFs that I created as Excel addins. They are all loaded at run time, but the first two return the #NAME? error when I try to use them... The third (Age3) works fine...
Function Age(DoB As Date) Age = Int((Date - DoB) / 365.25) End Function
Function Age2(DoB As Date) Age2 = Int((Date - DoB) / 365.25) End Function
Function Age3(DoB As Date) Age3 = Int((Date - DoB) / 365.25) End Function
Although I'm able to write UDFs and distribute addins, one thing I've found is that if you use a UDF formula on a sheet on one machine, save it, then open it on another, Excel doesn't automatically look in the local .xla for the formula. In fact it tries to find it on the network (expecting to locate the originating user's machine, I suspect) and then throw a strop....
I have a column J that is named Premium. If I use the function =INT(Premium) in K4 then it returns the integer for the value in J4. If I do the same thing with a UDF then the function argument receives all the values in column J. The author of the function says this is how UDFs work by design. Is there a way to use defined names with UDFs and have it work the way it does with built in functions?
I have a addin that contains user defined functions. I am using the MacroOptions command to assign the functions to categories. The addin loads without any problem in Excel 2003. In Excel 2002 and Excel 2007 Beta, if I open Excel and load the addin using the menu the addin loads OK. But when I try to open Excel with the addin already installed I get the following error message: Run-time error '1004': Method 'MacroOptions' of object'_Application' failed. how to aviod this error message in Excel 2002 and Excel 2007 Beta?
When I Step through (Using the f8 Key) the below code -- Comments Explain my problem/Question
Code:
Sub SetUpTable() Worksheets("Sheet1").Activate Application.Calculation = xlCalculationManual ' Without entering this line the Macro in the next line or two), jumps to and begins running a UDF in a VBE ADDIN 'Module marked as Volitile For TheYear = 1 To 5 Cells(1, TheYear + 1).Value = 1990 + TheYear
I have an add-in with UDFs. I want explanation of the function arguments in the function wizard and also be able to click for Help in the wizard. So I register the functions like this:
Where Param is the address of an array with argument descriptions, as text (like "A1:A4").
If I run the xlsm file, it works fine.
But if I load the xlam file in the add-ins dialog, the path to the Help file seems to be lost; I get directed to Excel's general online Help. The explanation of the arguments still work. Probably because they are already in the registry. But shouldn't the Help path be held in the registry as well?
I have been asked to look at moving a very large set of pricing sheets from Excel 2000 to Excel 2003. In the progress of this I have found that the functionality for a UDF in a cell to change/recalculate any other cells has been removed in Excel XP, whereas it was available in Excel 2000. The amount of work required to refactor the code is very large, and before starting on it it would be good to find out if there is a workaround.
The Sheet works in the following way:-User enters values, clicks a button to run a Macro,-Macro calculates all the ranges required to return a price-In many of the cells it is calculating are Functions which go and look at a large number of cells to calculate the price, sometimes writing to other Cells and sometimes having to recalculate other cells-As it is such a large sheet we can't simply calculate all cells before we tell it to price, as they are not all needed and so aren't calculated unless needed for performance reasons.It would be a lot of work to move the functionality from the Functions to the initial macro call, though this would solve the problem. Is there any other workaround?Macro security is set to low.The Errors I receive are the following:The UDF will hit a line like Range("DataRange").Calculate and this will raise a "Calculate method of Range class Failed" error. If it hits a line like Range("DataRange").Value = 1 this will raise a "Application-defined or object-defined error"If it hits a line like ActiveWorkbook.Names.Add Name:="This_Name", RefersToR1C1:="=Sheet1!R8C2" then it also raise a "Application-defined or object-defined error".Any of these run from a UDF in Excel 2000 works.I have a sample workbook if this isn't clear
I need to create a macro that can create a dynamic copy/paste loop. So far what I have is horribly inefficient. Each row in colmn A(minus the header) has a unique number in it. For each unique number, I need to paste it based on the number of column headers in row 1(minus column A). So, if there are 20 column headers, I need to copy cell A2 and paste it 19 times in another sheet. Then, I need to move to the next number in column A and do the same thing. Here's what I have:
[Code] .........
You can see that this is not dynamic. If I add another row to my table and rerun the macro, it will not catch it. I've attached a sample file to show you the big picture of what I'm trying to do. The data that I have is in Sheet1, and I'm trying to get it into the format in Sheet3. Rows/columns will be periodically added to the table in Sheet1, so the macro needs to be dynamic to catch that. The data in Sheet3 will always remain, and the macro will add the updated data below the old data in Sheet3.
Trying to create an excel chart to create totals based upon different keys. I need to be able to calculate how many customers there are by Manager and then By Rep. Then to figure out how many were New, Current, Total # of RSVP and attended for that Rep. Below is how I have started but I am having some problems getting certain parts. I know when I get one the rest will fall into place. I can calculate how many total customers by manager and by rep just by doing a Countif command but how do I determine the # of New, Current etc. Is there a If Than command? Managers Totals are simply his reps totals.
Example.. A B C D E F G 1 Manager Rep Customer New Biz Current # RSVP # Actual Attend
Need totals to look something like this....
A B C D E F G 1 # of Cust # New # Current #RSVP # Actual Attend 2 Manager 3 Rep 1 4 Rep 2
I have a sheet with a list of suppliers, then under that, all the products we buy from them.
What I'd like is each time the word "Supplier" appears in column A, a new Tab is created with the value in column B as the title, then all the data under than copied until the word "Supplier" appears again.
I found this really cool code that creates a tag cloud in Excel using VBA. It's far too complex for my understanding but I was hoping I could get some of the experts opinions on here about modification possibilities. I have attached the macro-enabled 2007 workbook. What I am trying to do is search through a list of keywords and determine each keyword's density within a list. The list for example could look like this:
slow windows xp windows xp running slow windows xp computer [slow windows xp] [windows xp running slow] [windows xp computer] [computer running slow windows xp] "computer running slow windows xp" "slow windows xp" "windows xp running slow" "windows xp computer"
You'll notice the characters " [ ] of which I would like to ignore when the cloud builds. The cloud would list the most dense keywords first, and gradually decrease to the least dense keywords. The macro code is inside the workbook but I'll list it here to:
I have a spreadsheet in which I want to extract or create two different columsn one will have the name of the store and the other will have the SKU item number. the way it is right both are on same column. I have attached a sample.
Here I am Attachiching a MHTML file which has multilayer in the left panel. If You Open it in excel u can edit it and navigate through the layers. I want to know can I create an excel file like this one.
http://rapidshare.com/files/235065073/howto.MHTML.html OR http://www.2shared.com/file/5865199/84c1fea5/howto.html (sorry excel forum is not accepting mhtml file for attachment)
As you can see from the chart or picture. I want to create a =IF function signal so that on the right column it will show which of the hours is the top 20%/top 5 hours
Is there anyway possible in excel to do this? To create a signal on the right showing which of the days hours, is the top 5 hours with the highest volumne?
How to create a excel file with 0 KB ? Because when the user creates a new excel file, it is created with 9 KB by default. But when creating a word file its created with 0 KB. Why its happening ? I want to test uploading a excel file with 0 KB..
I have a large table with data, and I would like to have a box at the top, and when some types the name of city, then all records that have the city will come up. how to do it.
i want to create one user form like shown in this picture below. right side 3 options need to input form the user and clicking on the button get option chain, it gets the data from www and fills all the columns frm expiry to optn int..
I have an excel sheet that will have a column with out of sequence numbers. I need a script that will evaluate each row and insert a row and the missing sequence. Below is the code I have written but I keep getting a compile error saying Else without If.
I want to be able to create formulas where the output can act as the input.
For example, I tried to write a simple proof of concept script where you can convert between pounds and kilograms. So if you type in a value for pounds, it'll update the kilograms cell. And if you type in a value for kilograms - it'll update the pounds cell.
Trying to create an N1.85 graph in Excel that has irregular spaced tick marks on the X-axis. Found the following information but no luck with it. Need US measure for this semi-log (10 X N1.85) graph. Also called a semi-expo (Q1.85) graph.
The resulting graph appears to be a log graph in reverse with one scale; the column widths are smaller at the left and become larger as they progress to the right.
Info found:
A 1.85 graph can be constructed manually by establishing a series of 15 values (in the case of the example in D5.2.1) from a base measurement to the exponent of 1.85.
Step 1 Select a base measurement for the desired size of the graph. A base measurement of 1.0 mm will produce a graph to 15 which is approximately 150 mm wide; a base measurement of 1.5 mm will produce a graph approximately 300 mm wide. In the case of a 1 mm base measurement, the x-axis numbers will be the 1-15 series. In the case of a base of 1.5 mm, the numbers will be represented by the series: 1.5, 3.0, 4.5, 6.0 etc. for 15 values.
Step 2 Construct a series of columns to the 1.85 exponent values measured from the zero point. The rows representing the pressure values are linear.
NOTE - A good approximation of the above can be computer-generated by a spreadsheet programme by entering a column width established from the exponential figures by subtracting the preceding value in each case. The column dimensions are displayed in the number of standard characters able to be accommodated in the column width which is slightly inaccurate in linear dimension.
The figures below indicate the values for a graph based on 1.0 mm.
Linear scale Exponential value of linear values = Column width = linear values to 1.85 power exponential value - preceding value
I'm sure this is easy but I'm trying to create a for...next loop that goes across the row. My final output will be basically be to see if the cell says Saturday or Sunday and offset by 2 rows and highlight the rest of the column.
Code:
Range("A1").Select For X = 2 To Range(Activecell, Selection.End(xlRight)).Column Range(2, X).Select ActiveCell.Value = "Column" Next X
That's what I came up with but it doesn't seem to be right.
if it is possible to create a floating Tab like you get on websites, so ehwn you move the spreadsheet to the left or right, the tab/shape with words in moves with you.
I have lot of post codes which needs to be checked in a web page and the output column needs to be updated in the spreadsheet.
Link: - Find UK Postcodes Inside a Radius
for example: - The post code WD18 1TB will be there in Excel Sheet this has to be copied and pasted in the link in column
Step 2 : Click on map OR Place radius by location name or postcode
and Step 1 : Radius should be updated as 10 and then the Draw Radius needs to be clicked. Then the output needs to be copied (in this case the output is: AL2,HA1,HA2,HA3,HA4,HA5,HA6,HA7,HP3,UB9,WD1,WD17,WD18,WD19,WD2,WD23,WD24,WD25,WD3,WD4,WD5,WD6,WD7) in our spreadsheet in the next sheet.
In column A, I have numbers ranging from 0-6. In column B, I would like to create a "Y" each time there is a 1 or 2 in column A. How can I create an IF function which will create a Y for a 1 or 2?