ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using VLOOKUP to count. (https://www.excelbanter.com/excel-discussion-misc-queries/88268-using-vlookup-count.html)

shakey1181

Using VLOOKUP to count.
 
I am struggling to get the following process to work:

Firstly, instead of vlookup returning a column index, I need it to return a
'1'. Also if the same figure appears again in the same column, to return a
'1' and then add them together. So for example the vlookup is searching for
'84' in column A, but it appears twice, so how would I get the destination
cell to show 2? Does that make sense?

I have tried several different methods, but I think this is beyond me.

Thanks in advance for any help



JE McGimpsey

Using VLOOKUP to count.
 
If I understand you correctly, one way:

=COUNTIF(A:A,84)

In article ,
shakey1181 wrote:

I am struggling to get the following process to work:

Firstly, instead of vlookup returning a column index, I need it to return a
'1'. Also if the same figure appears again in the same column, to return a
'1' and then add them together. So for example the vlookup is searching for
'84' in column A, but it appears twice, so how would I get the destination
cell to show 2? Does that make sense?

I have tried several different methods, but I think this is beyond me.

Thanks in advance for any help


Bob Phillips

Using VLOOKUP to count.
 
=COUNTIF(A:A,84)

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"shakey1181" wrote in message
...
I am struggling to get the following process to work:

Firstly, instead of vlookup returning a column index, I need it to return

a
'1'. Also if the same figure appears again in the same column, to return a
'1' and then add them together. So for example the vlookup is searching

for
'84' in column A, but it appears twice, so how would I get the destination
cell to show 2? Does that make sense?

I have tried several different methods, but I think this is beyond me.

Thanks in advance for any help





Niek Otten

Using VLOOKUP to count.
 
Look at COUNTIF. See HELP for details.

--
Kind regards,

Niek Otten

"shakey1181" wrote in message ...
|I am struggling to get the following process to work:
|
| Firstly, instead of vlookup returning a column index, I need it to return a
| '1'. Also if the same figure appears again in the same column, to return a
| '1' and then add them together. So for example the vlookup is searching for
| '84' in column A, but it appears twice, so how would I get the destination
| cell to show 2? Does that make sense?
|
| I have tried several different methods, but I think this is beyond me.
|
| Thanks in advance for any help
|
|




All times are GMT +1. The time now is 05:24 AM.

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