Mid Function Returns Odd Results

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


ADVERTISEMENT

Sumproduct Returns 0 Instead Of Expected Results

Sep 22, 2006

My SUMPRODUCT formula is returning 0 instead of expected results
=IF(ISERROR(SUMPRODUCT((WOR_Data!$A$2:$A$429=$A7)*(WOR_Data!$E$2:$E$429=$L7)*(WOR_Data!$K$2:$K$42))),0,SUMPRODUCT((WOR_Data!$A$2:$A$429=$A7)*(WOR_Data!$E$2:$E$429=$L7)*(WOR_Data!$K$2:$K$42)))

I have verified that all criteria match criterion for spelling, case, length(trailing spaces). All fine. First comparison is unit, second comparison is account description, 3rd argument of course column to be summed.

If I take out the error handler, I receive #VALUE! error

View 9 Replies View Related

Formula Returns Incorrect Results When Copied

Aug 4, 2006

My goal is to sum up the total sales and total forecasted sales of each cost center. I compiled a formula that is supposed to do this just as I want it to. Simple enough. However, for some odd reason the formula returns either the totals of ALL cost centers or just a zero instead of the correct result. The weird part is that when I check the formula by pressing the "insert formula" button it suggests that the formula actually should produce the desired result.

View 5 Replies View Related

Dropdown VLookup Menu Returns Multiple Results?

Oct 11, 2011

I'm attempting something new, a dropdown menu using vlookup to find data . If i use the simple example below, using data from B-D on 1 worksheet, where i want to find people by county:

A B C D
Search by County Name County Town
John Sussex Brighton
Eric Yorkshire York
Jim Cheshire Manchester
Liz Sussex Hove
Sarah Avon Bristol

I've created a dropdown menu on a second worksheet,A2, by county search, to return a persons name,county and town. The problem is if i select Sussex i will get 2 names who live in different towns within Sussex. I've created a simple vlookup which works fine, but because of Sussex having 2 results, i created a second vlookup for the second result to appear in the cell underneath.

The problem is that for the results that only have 1 result, the second vlookup returns a the same result as the first result, which i dont want.

Is there a way where multiple results will be shown if they exist, but for one result to appear if only one result exists?

View 9 Replies View Related

Macro That Returns Specific Results From A Longer List

Aug 4, 2008

I am trying to write a macro that returns specific results from a longer list based on an entry in a cell.

For example if I have “Colours” typed in cell A1 in Worksheet 1 and there is a list on Worksheet 2:

Colours Black
Colours Yellow
Colours Green
Animals Dog
Animals Cat
Animals Tiger


Then I would like the blow answers returned in cell B1 on worksheet 1
Black
Yellow
Green

View 9 Replies View Related

Date Search Macro Runs, But Returns No Results

Oct 6, 2008

I'm trying to make a macro to keep track of our rental properties. This macro, in another variant, worked as planned, searching for data in a column, copying the row to a new sheet, and clearing the contents of that row.
So I've tried to make it search for a date in a new workbook and do the same. It runs, and tells me it has returned zero significant results (did not find data to move and delete).
My column I is formatted mm/dd/yy . And the rest of the workbook is protected.
Here's what I have:


Sub CopyReturns()
'Macro written 10/2/08 by Jeff
ActiveSheet.Unprotect
Dim DestSheet As Worksheet
Set DestSheet = Worksheets("Sheet2")
Dim sRow As Long 'row index on source worksheet
Dim dRow As Long 'row index on destination worksheet
Dim sCount As Long
sCount = 0............

View 9 Replies View Related

Query In An Access Database Which Returns Multiple Results

Aug 24, 2009

I have created a query in an Access database which returns multiple results. I need to be able to run this query within Excel, but only showing the total of the results in a single cell.

I also need to run it multiple times on the same sheet using different dates. The Access query asks for a date each time it's run

I have only found ways to retrieve the entire results of the query into Excel based on the settings within the query.

View 9 Replies View Related

Function Returns Value To Cell As Single - Function Is Defined To Return Double

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

The Results Of The Formula In Cell K36 In The Attached Spreadsheet Returns A Value Of Null

Feb 5, 2010

The results of the formula in cell K36 in the attached spreadsheet returns a value of null. It should be $1,200. Am I blind or have I done something wrong. I just can't see the problem with the formula.

View 6 Replies View Related

Grand Total Of The Calculated Field Returns Wrong Results

Apr 24, 2008

i have a problem regarding calculated field.. i have data of sales of a distributor with all the accounts that he handles.. i want to get the total number of buying accounts for that distributor..

buying account is an account that bought a specific product for at least one time... even the account buy 2 or 3 times more for that specific product the account is considered as 1 buying account..

i want to use a pivot table so i can manipulate the data.. first i tried to add an additional field to my data and put the formula
"if(norbo_val>0,1,0)" where norbo_val is the total sales less the rejects. it means if ever an account have positive sales the account is considered as a buying account for that specific product. my problem is that when that account bought the same product for 2 or more times it sums all the times an account bought for that specific product..

so i decide to remove the field in my data and create a calculated field in the pivot table. i input the same formula to the calculated field and it gives me the correct result where if ever an account bought a specific product for at least one time regardless on how many times the account bought that same product, the account is considered as 1 buying account. the only problem i am encountering now is that the grand total is not summing up the total numbers of buying accounts if i list all the accounts. it seems the formula is affecting the grand total where it should add the total of buying accounts but instead using the formula of the calculated field so the result is only 1.

View 9 Replies View Related

If One Function Returns Error Then Use Second Function

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

MIN Function Returns Same Value For Every Row?

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

SUM Function Returns #VALUE!

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

Function That Returns The First Value In An Array

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

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 View Related

Lookup Function Returns #N/A Or #REF

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

Instr Function Returns Zero

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

Format Function Returns . (Dot) Instead Of Zero

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

Function Returns #NUM! Error

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

WEEKNUM Function Returns #NAME?

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

Max Function That Returns A Column Heading

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

Function That Returns MIN (or MAX) Cell Reference

Apr 20, 2014

something that looks like =CELL.MIN(reference)

View 3 Replies View Related

Function That Returns Multiple Values?

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

IF Function Returns False Positive

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

Function To Returns Biggest Change (+ Or -)

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

AND Function Returns Zero For FALSE & One For TRUE

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

MATCH Function Returns Unexpected Result

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

Function To Indicate Whether An Expression Returns A Non-zero Result (2007)

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

Lookup Function Returns Type Mismatch?

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

Find Function In VBA Returns A Date That Is Almost Correct

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







Copyrights 2005-15 www.BigResource.com, All rights reserved