Hello World Function Returns #NAME?
Nov 17, 2009
I'm a newbie who has a simple "Area()" function that multiplies two numbers. I copied it off the Net as a programming test. I added to a Module of my Workbook using Tools>Macro>Visual Basic Editor. I put it in "Modules>Module1". Problem is, it doesn't seem to be recognized in my Workbook. When I enter "=Area(A1,A2)" into a cell (without the quotes) I get "#NAME?". What am I doing wrong? Here's the function:
View 6 Replies
ADVERTISEMENT
May 14, 2013
Function Haversine has correct value in debugger but in cell it has the same value as Haversine2. Is this a known bug?
Public Function Haversine(lat1 As Double, long1 As Double, lat2 As Double, long2 As Double) As Double
Dim temp As Double
[Code]....
View 9 Replies
View Related
Feb 18, 2013
I want a UDF; = OK (f1,f2) each argument being an alternative function. If f1 returns an error message then use f2. Should be easy but I cannot get it to work.
View 5 Replies
View Related
Mar 20, 2007
a way to turn excel into a world clock?
I am working for a company that has offices around the world, and I would like to see the time in all offices, when I am working in excel without using the internet (or spending monay on loads of wall clocks!)
View 10 Replies
View Related
Dec 26, 2013
In column D I have the time of the end of my shift. When I try to input =MIN(1;$D:$D) in column E, i get the same answer (0,625) for any row, while =$D:$D gives correct values. So I guess it has something to do with the MIN function
View 10 Replies
View Related
Aug 1, 2008
Have a spreadsheet prepared by someone else on older Excel version exported from database. The sum and count functions work fine both vertically and horizontally, but trying to add selected cells returns #VALUE! Attached is small range of 50-col x 2500 row spreadsheet. Original content is highlighted in yellow. See cell E2. I assume the forumula is seeing number content as text. How do I convert the entire spreadsheet to numbers.
View 3 Replies
View Related
Jun 16, 2014
I'm trying to find a formula to use for a specific numerical outcome. For example say you have two teams playing throughout the year and you've made a prediciton on the results. If your prediction is correct your awarded 7 points if you predict a win its 3 points and if your incorrect than it's zero. what is the formula for awarding points?
I've attached the spread sheet : FIFA Spread sheet.xlsx
View 2 Replies
View Related
Apr 19, 2006
I'm a keen football fan and have created a World Cup Wallchart in Excel. It's free and can be downloaded from here.
I've just created it so let me know of any bugs or comments - I'd be keen to know what you think. Only 51 days to go
Features:
Each country has their flag displayed for the matches and the group tables.
A map of Germany is displayed by the matches. When you select the row for the match the row will be highlighted and the city where the match is being played will be coloured red in the map.
The Match Schedule sheet will automatically scroll if your selected row is matchday 33+ and the map will move down
After the scores for a match have been entered the group tables will be updated and sorted by Points, Goal Difference then Goals For.
After each group is complete (i.e. the 6 matches for the group have been played) the round of 16 team names will begin to appear in the match day list.
If there is a tie after extra time in the knockout stages (match day 49 onwards) a box will appear asking you to enter the results of the penalty shootout.
Installation:
Download the World Cup zip file.
Unzip the contents of the zip file to a folder. Note that the Excel file and the image files must be retained in the same folder.
Open the Excel file and select the Enable Macros button. If the Enable Macros button doesn't appear select Tools|Macro Security and amend the security level to Medium then close Excel and re-open the file
View 9 Replies
View Related
Jan 24, 2007
I am working on a Monthly Vehicle Spread Sheet. One of the outputs I am trying to achieve is an automatic calculation of Mile Per Gallon. To do this, I need to know if there is a function that will return the value of the first entry of a group of cells.
In calculating the miles per gallon, I need to subtract the first gallon amount entry of the total gallons in the month, then divide that number into the difference of the mileage in the month recorded when the vehicles fueled up.
View 11 Replies
View Related
Jun 1, 2006
I'm using the following phrase out of a much longer expression to
demonstrate that the return value of the MID function seems to be nothing I
can understand.
This expression:
=MID("6/10x",1,FIND("x","6/10x)-1))
returns 6/10 as text which makes sense. However I was under the impression
that when text in Excel contains numeric characters, it can be interpreted
as a number. So then how does the following expression,
=MID("6/10x",1,FIND("x","6/10x)-1)*1
return the result 38878? Does it still think it's text?
View 12 Replies
View Related
Apr 23, 2007
Im trying to do a lookup but when I drag the formula down it returns the wrong values and also returns #N/A or #REF (which I think means it's refering to a wrong range and cant find the data???). How can I do a look up function by dragging the formula down a long column of data eg. 65,000 rows in excel, that returns the correct text. I have attached a simple example- see attached.
View 4 Replies
View Related
Jun 25, 2007
i have a very basic function using instr as follows:
ins = 0
Dim x As Integer
Dim y As Integer
findst = "["
finden = "]"
x = InStr(ins, oldstrgFd, findst, vbTextCompare)
y = InStr(ins, oldstrgFd, finden, vbTextCompare)
Debug.Print x,y
oldstrgFd in the example is populated with
[ClientName] Planning Workshop
[FeedbackLocation], [FeedbackDate]
[FeedbackPresenters]
I am expecting this the first positions of the square brackets, but x and y both return 0.
View 3 Replies
View Related
Sep 18, 2007
when ltoj is less than zero the following code enters a period in the cell instead of zero.
If ltoj < 0 Then ltoj = 0
Cells(r, 10) = Format(ltoj * 24, "##.##") 'writes data in correct format
View 2 Replies
View Related
Sep 30, 2007
Is there a way in which you can create an if function or similar to give a reason for why the cell of data has an error.
Basically i have some data in a table, and when a #num! error pops up id like to in the cell next to it give a sentence stating why this has happened.
E.G.
Cell A1 Cell B1
#Num! Number error due to 'x' being too small
Not sure how i can get this to work, i have tried a basic if function but that hasnt worked.
View 4 Replies
View Related
Jan 17, 2008
I am trying to get the week from a given data (from a cell that has been correctly formatted with date). =YEAR works, =MONTH works, =WEEKNUM does not work. I am using Excel 2003 and I have tried in both my workplace and at home...
I.e., I have a date in C2 (18-05-08), and =YEAR(C2) returns 2008, =MONTH(C2) returns 5, while =WEEKNUM(C2) returns #NAME, and =WEEKNUM(C2,2) does not work at all...
View 6 Replies
View Related
Sep 9, 2013
Im using excel 2010. Im looking to have a map of the world in excel. I work in sales with 2 other people and we wish to divide the world up by countries.
It would be nice to have the names in a list and colours represent the countries.
View 2 Replies
View Related
Mar 27, 2014
Let's say I have data that looks like this grid below. Each color represents a column heading and each number is a data point within that column.
Blue Red Green Yellow
18 27 15 36
56 41 3 22
Can I write a formula that would do the following 2 things with the data in this format:
1. Find the max of the data...simple =Max(...) formula
2. Use the max to return the column heading. In this case the max is 56 so the value I want to return is "Blue"
View 3 Replies
View Related
Apr 20, 2014
something that looks like =CELL.MIN(reference)
View 3 Replies
View Related
Oct 14, 2009
I've never quite mastered the idea of passing arguments between subs and functions. I have a project right now where I am writing this same bit of code over and over, for different parts of the macro:
View 4 Replies
View Related
May 7, 2009
I have calculated the t values then i have three tables for 3 confidence levels, 0.01, 0.05,0.1 in which I compare the t value with the value from the
t-test table. If the t value is larger it returns a 1, if not a 0. This works fine.
To summarise the information I have a final table which I wish to return the highest significance of the given t value.
I am using this
=IF((G53=1),0.01,(IF(G44=1,0.05,(IF(G35=10,0.05,"none")))))
the problem I have is it always returns 0.01 even if g53=0. If i remove the formula from g53 and replace it with a 0, it returns 0.05 instead (even if g44 is retruning a 0).
I have considered copy paste values and doing this but that rather removes the automation aspect of the spreadsheet if I need to make adjustments.
View 4 Replies
View Related
Feb 1, 2010
I have some survey data for 2008 & 2009. I have a column calculating the difference on each question between the two years. I need to show the 20 biggest changes, positive or negative. Which function can I use for this?
View 9 Replies
View Related
Oct 18, 2007
I've been asked to adjust some thing with a worksheet someone else created. On the sheet labeled "Criteria" there is a list of dates and some formulas that use these dates. I can't figure out why the result of the formula is a number, i.e "0"; I thought it is supposed to return "TRUE" or "FALSE". If I insert a new sheet, within the same workbook, and insert the same formula, I get "TRUE" or "FALSE". For some reason, the "Criteria" worksheet doesn't return "TRUE" or "FALSE", it returns numbers. I just need to know why this is happening so I can replicate it in the new workbook I'm creating.
View 2 Replies
View Related
Dec 3, 2013
In the attached file I used =MATCH(TRUE,INDEX($B$2:$B$10="",0)) to retrieve the location of the first empty cell.
When using the "Evaluate Formula" tool, it is clear that the position in the array created by the INDEX function is the 6th. Nevertheless, the final outcome is 9, being the last cell in range.
View 3 Replies
View Related
Jan 28, 2010
I have this COUNTIFS expression buried in a larger formula:
COUNTIFS(Table[C7],Table[C7]&"",Table[C21],">=1")
and it always returns a value of zero or some positive integer.
I'm now looking for a little "function" that I can wrap around this expression that will:
A) indicate any non-zero result as 1 or TRUE
and
B) indicate any zero result as 0 or FALSE
Something like...
AREYOUNONZERO( (COUNTIFS(Table[C7],Table[C7]&"",Table[C21],">=1") )
I'm sure there's a fairly efficient way to do this... but I'm totally stumped at the moment!
View 7 Replies
View Related
Feb 23, 2014
I get a Type mismatch from this line:
x = Application.WorksheetFunction.Lookup(2, 1 / (Range("G7:P7") = "A"), Range("G7:P7"))
View 1 Replies
View Related
Feb 22, 2013
Is it possible to see why this code returns a date that is almost correct? Searching for 01.01.2005 I get 01.11.2005 as result. I would like the code to only show the correct date, and if it doesn't exist it should end up showing "nothing".
Code:
Set fstdate = wsOBX.Range("B1:B" & lr1).Find(what:=startdate, _
LookIn:=xlFormulas, lookat:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
View 3 Replies
View Related
Jun 20, 2006
I am trying to write a UDF that will calculate a value and return it to the cell, and also create a comment in the cell showing the formula used. Here is an example of the "=calculate(A2,B2)" placed in cell A1
Function calculate(ByRef X As Range,ByRef Y As Range)
calculate=x*y
calculate.addcomment "calculate = " & X & " * " & Y
End Function
the problem commes from the add comment field. I can add a comment to any cell but the cell the formula is called from.
View 3 Replies
View Related
Apr 22, 2008
I setup this function to pull my staff's schedule an auto generate the forms i need however the lookup function works properly sometimes and improperly others i checked the syntax and it is correct how ever the wrong data is continually returned. I have attached the file if anyone can help. the VISUAL PLAN tab is the one contaning the formula and it pulls data from PLAN, CURENT SCHEDULE, AND CATAGORY SUMMARY however the only formulas hat i have a problem with are the ones referencing CURENT SCHEDULE.
View 9 Replies
View Related
Aug 22, 2012
I'm compiling a list of names on a separate tab from a column that only lists the names sporadically. Problem: In the formula, the IF provides a TRUE, the row function, and consequently, the INDEX function (when I hit F9) provides the correct "name" and row number, but when I hit return, it provides the text 4 cells beneath what it should.
=IF(ROWS(F$5:F5)
View 7 Replies
View Related
Aug 2, 2014
I have created a calculated column in PowerPivot and inserted a formula that worked in a normal excel spreadsheet however, this formula does not work in PP anymore.
=find("green",Table1[Name],1)
Name column:
NAME: Bag green
it should find "green" in the name and return the position. Hoever it alway returns the error, that the find function could not find the string.I have attached an example spreadsheet.
View 1 Replies
View Related