ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Return cell value only once (https://www.excelbanter.com/excel-discussion-misc-queries/92395-return-cell-value-only-once.html)

Marko Ramius

Return cell value only once
 
I am trying to do the following

E.g.

Alligator 1
Bear 1
Cheetah 1
Deer 1

Imagine the above is two column with a column of names (Col A) and the other
of values (Col B). I managed to put in a function in another cell whereby it
will look up Col B to look for value "1". If the value is "1" the cell will
display the corresponding name, i.e. Deer. However, the problem is when I
put in another cell looking for another name whose corresponding value is 1,
it returns Deer. How do I avoid this problem so that it will return me a
value that has not shown yet?

Allllen

Return cell value only once
 
if you are using some kind of vlookup or index, with match? set to false, it
will always return the first value it comes across.

I suggest adding more columns to work out the # of the occurrence.
So

A 1 1
B 1 2
C 1 3
D 1 4
Elephant 2 1
Fish 2 2

Then you can use COUNTIF to see how many times you have the number 2, and
then report them as #1 = Elephant and #2 = Fish

--
Allllen


"Marko Ramius" wrote:

I am trying to do the following

E.g.

Alligator 1
Bear 1
Cheetah 1
Deer 1

Imagine the above is two column with a column of names (Col A) and the other
of values (Col B). I managed to put in a function in another cell whereby it
will look up Col B to look for value "1". If the value is "1" the cell will
display the corresponding name, i.e. Deer. However, the problem is when I
put in another cell looking for another name whose corresponding value is 1,
it returns Deer. How do I avoid this problem so that it will return me a
value that has not shown yet?


Marko Ramius

Return cell value only once
 
Hi Allen

Thanks for your quick reponse. I may be too dense and am not too clear
about your instructions.

What I am trying to do is so that once let's say a name who's corresponding
value is 1 has been chosen, the next time i look for another name with the
value "1", it will return the name that is next to it. How by putting
sequential numbers next to it will it return me the name that has not been
chosen yet?

"Allllen" wrote:

if you are using some kind of vlookup or index, with match? set to false, it
will always return the first value it comes across.

I suggest adding more columns to work out the # of the occurrence.
So

A 1 1
B 1 2
C 1 3
D 1 4
Elephant 2 1
Fish 2 2

Then you can use COUNTIF to see how many times you have the number 2, and
then report them as #1 = Elephant and #2 = Fish

--
Allllen


"Marko Ramius" wrote:

I am trying to do the following

E.g.

Alligator 1
Bear 1
Cheetah 1
Deer 1

Imagine the above is two column with a column of names (Col A) and the other
of values (Col B). I managed to put in a function in another cell whereby it
will look up Col B to look for value "1". If the value is "1" the cell will
display the corresponding name, i.e. Deer. However, the problem is when I
put in another cell looking for another name whose corresponding value is 1,
it returns Deer. How do I avoid this problem so that it will return me a
value that has not shown yet?


Allllen

Return cell value only once
 
Can you give me the formula that you have put in the other cell.
--
Allen


"Marko Ramius" wrote:

Hi Allen

Thanks for your quick reponse. I may be too dense and am not too clear
about your instructions.

What I am trying to do is so that once let's say a name who's corresponding
value is 1 has been chosen, the next time i look for another name with the
value "1", it will return the name that is next to it. How by putting
sequential numbers next to it will it return me the name that has not been
chosen yet?

"Allllen" wrote:

if you are using some kind of vlookup or index, with match? set to false, it
will always return the first value it comes across.

I suggest adding more columns to work out the # of the occurrence.
So

A 1 1
B 1 2
C 1 3
D 1 4
Elephant 2 1
Fish 2 2

Then you can use COUNTIF to see how many times you have the number 2, and
then report them as #1 = Elephant and #2 = Fish

--
Allllen


"Marko Ramius" wrote:

I am trying to do the following

E.g.

Alligator 1
Bear 1
Cheetah 1
Deer 1

Imagine the above is two column with a column of names (Col A) and the other
of values (Col B). I managed to put in a function in another cell whereby it
will look up Col B to look for value "1". If the value is "1" the cell will
display the corresponding name, i.e. Deer. However, the problem is when I
put in another cell looking for another name whose corresponding value is 1,
it returns Deer. How do I avoid this problem so that it will return me a
value that has not shown yet?



All times are GMT +1. The time now is 03:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com