Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default =IF(COUNTIF to search several groups of cells

I made a function to search a sheet to match a cell on another sheet.

=IF(COUNTIF(M16M4M203!$O3:$O24,B3)0,"X","")

This works great, but I need it to only search certain cells on the sheet. I
tried to just select those cells and control-click another group but Excel
tells me "You've entered too many arguements for this function"

Do I need to make a function for each range of cells to search? If so, how
do I put more than one function in a single cell.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ian Ian is offline
external usenet poster
 
Posts: 109
Default =IF(COUNTIF to search several groups of cells

You have two If clauses but only one logical test -- that's why the formula
is flawed.
Also, individual cells need to be seperated by a comma.

=if(COUNT OF RANGE 0, "X","")
if that's correct =if(Count(M16,M15,$03:$024,B3)0,"X","")
will count the individual cells and $03:$o24 with numbers in it. If any of
them have a number it will mark the cell with the formula as X. I've taken
the CountIf test out because I couldn't figure what what if was supposed to
be compared to.

Did I get it correct?
Ian

"Spamn" wrote:

I made a function to search a sheet to match a cell on another sheet.

=IF(COUNTIF(M16M4M203!$O3:$O24,B3)0,"X","")

This works great, but I need it to only search certain cells on the sheet. I
tried to just select those cells and control-click another group but Excel
tells me "You've entered too many arguements for this function"

Do I need to make a function for each range of cells to search? If so, how
do I put more than one function in a single cell.

Thank you

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default =IF(COUNTIF to search several groups of cells

I'm not sure.. I understand why you took the other IF out, it works either
way. Less work that way though.

If you look at my example below you'll see that I'm searching a sheet named
"M16M4M203" between cells 03-024. My question is, what if I wanted to search
cells in say the upper right hand corner of my sheet and nothing else around
it. How would I do that? I've tried highlighting the cells to be searched and
it gives me this function

=IF(COUNT(M16M4M203!M3:Q29,B3)0,"X","")

but that searches more than just that section.

I hope this helps explain my problem a little more.



"Ian" wrote:

You have two If clauses but only one logical test -- that's why the formula
is flawed.
Also, individual cells need to be seperated by a comma.

=if(COUNT OF RANGE 0, "X","")
if that's correct =if(Count(M16,M15,$03:$024,B3)0,"X","")
will count the individual cells and $03:$o24 with numbers in it. If any of
them have a number it will mark the cell with the formula as X. I've taken
the CountIf test out because I couldn't figure what what if was supposed to
be compared to.

Did I get it correct?
Ian

"Spamn" wrote:

I made a function to search a sheet to match a cell on another sheet.

=IF(COUNTIF(M16M4M203!$O3:$O24,B3)0,"X","")

This works great, but I need it to only search certain cells on the sheet. I
tried to just select those cells and control-click another group but Excel
tells me "You've entered too many arguements for this function"

Do I need to make a function for each range of cells to search? If so, how
do I put more than one function in a single cell.

Thank you

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =IF(COUNTIF to search several groups of cells

Do I need to make a function for each range of cells to search?

Maybe. How many different ranges are there? Are they all the same size?

One way to do it provided all the ranges are the same size and shape:

=IF(SUMPRODUCT(--(A1:A5=B3)+(K16:K20=B3)),"X",0)

Or, if the ranges differ in size/shape, you can always do this:

=IF(COUNTIF(A1:A15,B3)+COUNTIF(K16:AA16,B3),"X","" )

Biff

"Spamn" wrote in message
...
I made a function to search a sheet to match a cell on another sheet.

=IF(COUNTIF(M16M4M203!$O3:$O24,B3)0,"X","")

This works great, but I need it to only search certain cells on the sheet.
I
tried to just select those cells and control-click another group but Excel
tells me "You've entered too many arguements for this function"

Do I need to make a function for each range of cells to search? If so, how
do I put more than one function in a single cell.

Thank you



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Merged Cells in Different Workbooks jeffc4442 Excel Discussion (Misc queries) 7 January 31st 07 01:53 PM
select cells that are the result of a search john mcmichael Excel Discussion (Misc queries) 3 November 8th 06 09:26 PM
search column of text cellto identify those cells with specific w Ross Headifen Excel Worksheet Functions 1 July 8th 06 02:49 PM
Search multiple columns and display corresponding cells in a list?!? far2rare Excel Discussion (Misc queries) 9 July 4th 06 11:46 PM
How do I search for a total using nonadjacent cells rwfrench Excel Worksheet Functions 3 March 20th 06 02:56 AM


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"