Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Need some help with correct syntax...
I have 3 columns of data to compare. In the 2nd and 3rd columns, I want to look for matching numbers. Where a match is found, I want to check for a 1 in the 1st column. If all that matches, I want to copy the matching number in the 3rd column to a blank 4th column. Basically, If B2 = any number in C2 thru C50, and A2=1 then copy B2 to D2. I hope that makes sense. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
if Range("A2").Value = 1 and _
Application.Countif(Range("C2:C50"), _ Range("B2").Value) 0 then Range("D2").Value = Range("B2").Value End If for for a formula =if(And(A2=1,countif(C2:C50,B2)0),B2,"") -- Regards, Tom Ogilvy "Dan B" wrote in message ... Need some help with correct syntax... I have 3 columns of data to compare. In the 2nd and 3rd columns, I want to look for matching numbers. Where a match is found, I want to check for a 1 in the 1st column. If all that matches, I want to copy the matching number in the 3rd column to a blank 4th column. Basically, If B2 = any number in C2 thru C50, and A2=1 then copy B2 to D2. I hope that makes sense. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Dan
i think the following formula for D2 gives you what you're after =IF(AND(COUNTIF($C$2:$C$50,B2),A2=1),B2,"") Cheers JulieD "Dan B" wrote in message ... Need some help with correct syntax... I have 3 columns of data to compare. In the 2nd and 3rd columns, I want to look for matching numbers. Where a match is found, I want to check for a 1 in the 1st column. If all that matches, I want to copy the matching number in the 3rd column to a blank 4th column. Basically, If B2 = any number in C2 thru C50, and A2=1 then copy B2 to D2. I hope that makes sense. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
try in D2: =IF((COUNTIF($C$2:$C$50,B2))*(A2=1),B2,"") -- Regards Frank Kabel Frankfurt, Germany Dan B wrote: Need some help with correct syntax... I have 3 columns of data to compare. In the 2nd and 3rd columns, I want to look for matching numbers. Where a match is found, I want to check for a 1 in the 1st column. If all that matches, I want to copy the matching number in the 3rd column to a blank 4th column. Basically, If B2 = any number in C2 thru C50, and A2=1 then copy B2 to D2. I hope that makes sense. Thanks |
#5
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
These worked Great!
Thank you very much!! Dan "Dan B" wrote in message ... Need some help with correct syntax... I have 3 columns of data to compare. In the 2nd and 3rd columns, I want to look for matching numbers. Where a match is found, I want to check for a 1 in the 1st column. If all that matches, I want to copy the matching number in the 3rd column to a blank 4th column. Basically, If B2 = any number in C2 thru C50, and A2=1 then copy B2 to D2. I hope that makes sense. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Comparison | Excel Discussion (Misc queries) | |||
nested if based on nested if in seperate sheet. how? | Excel Worksheet Functions | |||
XLS comparison | Excel Discussion (Misc queries) | |||
What is quicker? Nested or non nested ifs | Excel Programming | |||
Comparison | Excel Programming |