Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Hello,
two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Hi,
In cell C2, you can use the formula =If(a1=b1,2,1) -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Dave" wrote in message ... Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
=IF(A1=B1,2,1)
-- Gary''s Student - gsnu200832 "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Hi,
A couple of ways =DELTA(A1,B1)+1 or =(A1=B1)*1+1 Mike "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
I should have mentioned that if you use DELTA and get a name error then
Tools|Addins and check the analysis toolpak re-enter the formula Mike "Mike H" wrote: Hi, A couple of ways =DELTA(A1,B1)+1 or =(A1=B1)*1+1 Mike "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
=COUNTIF(A1:B1,A1)
"Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Thank you
"Ashish Mathur" wrote: Hi, In cell C2, you can use the formula =If(a1=b1,2,1) -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Dave" wrote in message ... Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Thank you
"Gary''s Student" wrote: =IF(A1=B1,2,1) -- Gary''s Student - gsnu200832 "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Thank you
"Mike H" wrote: Hi, A couple of ways =DELTA(A1,B1)+1 or =(A1=B1)*1+1 Mike "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#10
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Thank you
"Teethless mama" wrote: =COUNTIF(A1:B1,A1) "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#11
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
You are welcome
-- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Ashish Mathur" wrote in message ... Hi, In cell C2, you can use the formula =If(a1=b1,2,1) -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Dave" wrote in message ... Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#12
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
On Sat, 7 Feb 2009 04:27:02 -0800, Dave wrote:
Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d =1+(A1=B1) --ron |
#13
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
On Sat, 7 Feb 2009 04:38:01 -0800, Mike H
wrote: =(A1=B1)*1+1 The *1 seems to be superfluous. =(A1=B1)+1 --ron |
#14
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Ron,
I had a mindset about changing false/true to 0 or 1 and then adding the 1 the OP wanted and failed to realise the +1 would do both jobs. Thanks for pointing that out. Mike "Ron Rosenfeld" wrote: On Sat, 7 Feb 2009 04:38:01 -0800, Mike H wrote: =(A1=B1)*1+1 The *1 seems to be superfluous. =(A1=B1)+1 --ron |
#15
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Hi,
One advantage in using COUNTIF is that it will work for Text, Numbers, or Dates One advantage in using =1+(A1=A2) or DELTA is that the cells don't need to be adjactent, but both of these don't work for text. -- If this helps, please click the Yes button Cheers, Shane Devenshire "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#16
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
using =1+(A1=A2) or DELTA
but both of these don't work for text. =1+(A1=A2) Does work with text. -- Biff Microsoft Excel MVP "Shane Devenshire" wrote in message ... Hi, One advantage in using COUNTIF is that it will work for Text, Numbers, or Dates One advantage in using =1+(A1=A2) or DELTA is that the cells don't need to be adjactent, but both of these don't work for text. -- If this helps, please click the Yes button Cheers, Shane Devenshire "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#17
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
On Sat, 7 Feb 2009 09:34:01 -0800, Shane Devenshire
wrote: One advantage in using =1+(A1=A2) or DELTA is that the cells don't need to be adjactent, but both of these don't work for text. I'm not sure about your English. Maybe the difference between GB and the colonies? When you write "both of these don't work for text", some would take that to mean that "neither" of these equations work for text. I believe it would be useful to point out that the first equation works for text or numbers, and the second only works for numbers. And to be complete, the first is not case-sensitive when applied to text. A case-sensitive variation, which would work for both text and numbers, would be: =exact(a1,a2)+1 --ron |
#18
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Shane,
You missed a major disadvantage of DELTA is that it can only take 2 arguments and would become more trouble than it's worth with the fiddling about you'd have to do when trying to evaluate more than 2. The only reason I offered it was because th OP specified 2 numbers. We'll disagree about whether =(A1=B1)+1 can handle text, I remain of the opinion it can :) Mike "Shane Devenshire" wrote: Hi, One advantage in using COUNTIF is that it will work for Text, Numbers, or Dates One advantage in using =1+(A1=A2) or DELTA is that the cells don't need to be adjactent, but both of these don't work for text. -- If this helps, please click the Yes button Cheers, Shane Devenshire "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
#19
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Test 2 numbers
Hi all
We don't have to disagree on whether the first one will work with text, I was a little fast on the draw, it does work for text. And I like the additional point about the limits of DELTA. But I was glad to see someone find a use for DELTA, I sure there are others but it usually seems a little longer that other solutions. Cheers, Shane Devenshire "Mike H" wrote: Shane, You missed a major disadvantage of DELTA is that it can only take 2 arguments and would become more trouble than it's worth with the fiddling about you'd have to do when trying to evaluate more than 2. The only reason I offered it was because th OP specified 2 numbers. We'll disagree about whether =(A1=B1)+1 can handle text, I remain of the opinion it can :) Mike "Shane Devenshire" wrote: Hi, One advantage in using COUNTIF is that it will work for Text, Numbers, or Dates One advantage in using =1+(A1=A2) or DELTA is that the cells don't need to be adjactent, but both of these don't work for text. -- If this helps, please click the Yes button Cheers, Shane Devenshire "Dave" wrote: Hello, two number in (say) a1 & b1 In another cell If the numbers are different how can i get Excel to return 1 or if the numbers are the same 2 d |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
TEST TEST | Excel Discussion (Misc queries) | |||
Converting test to numbers and adding into a summary page | Excel Worksheet Functions | |||
Calculate mean of test scores from rows of test answers | Excel Discussion (Misc queries) | |||
logical test, array, text and numbers | Excel Worksheet Functions | |||
test..where are my messages..test | New Users to Excel |