Ok Jan, try this
=INDEX(A1:A5,SUMPRODUCT(--COUNTIF(E1:G2,A1:A5),--ROW(A1:A5)))
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Jan Kronsell" <kronsell(nomorespam)@adslhome.dk> wrote in message
news:%(E-Mail Removed)...
> There is never more than one. Either one or none. So if there is none, it
> should return none. If thetre is one, it should return that one.
>
> Jan
>
> "Bob Phillips" <(E-Mail Removed)> skrev i en meddelelse
> news:(E-Mail Removed)...
> > But you want to know what number matches, so if there is more than one,
> > which should it return?
> >
> > --
> > HTH
> >
> > Bob Phillips
> >
> > (remove nothere from email address if mailing direct)
> >
> > "Jan Kronsell" <kronsell(nomorespam)@adslhome.dk> wrote in message
> > news:%(E-Mail Removed)...
> >> Maybe I'm doing something wrong, but in the case it only checks with
the
> >> number i A1 I think. so if the number exist in any other cell in range
> > one,
> >> it always returns a zero. What I really need is to compare each cell in
> >> range 1, with each cell in range 2 in one formula. Something like
> >>
> >> =IF(COUNTIF($D$1:$F$2,A:A)>0,value from found cell in A:A,"")
> >>
> >> but that doesn't work even if I try to make it an arrayformula.
> >>
> >> Jan
> >>
> >>
> >> "Bob Phillips" <(E-Mail Removed)> skrev i en
meddelelse
> >> news:(E-Mail Removed)...
> >> > Use COUNTIF, such as
> >> >
> >>
> >> >=IF(COUNTIF($D$1:$F$2,A1)>0,A!,"")
> >> > --
> >> > HTH
> >> >
> >> > Bob Phillips
> >> >
> >> > (remove nothere from email address if mailing direct)
> >> >
> >> > "Jan Kronsell" <kronsell(nomorespam)@adslhome.dk> wrote in message
> >> > news:esu$(E-Mail Removed)...
> >> >> Hi NG
> >> >>
> >> >> I have two ranges. The first is a column of numbers say A:A), maybe
> >> >>
> >> >> 1
> >> >> 2
> >> >> 3
> >> >> 4
> >> >> 5
> >> >>
> >> >> The other range is just a range of numbers (say C1:E2).
> >> >>
> >> >> 2 9 7
> >> >> 6 10 8
> >> >>
> >> >> I now want to test if one of the numbers in range 1 exists in range
2
> >> > (range
> >> >> 2 contians either one, og no numbers from range 1, never more than
> > one.).
> >> > If
> >> >> a number exist, I want to return the value of that number, if it
does
> >> >> not,
> >> > i
> >> >> want to return "".
> >> >>
> >> >> Jan
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>
|