If Statement w Variables

Datatellsall2

New Member
Joined
Jul 17, 2018
Messages
23
Hello,

I can't seem to obtain the necessary information for a column I'm trying to calculate. I'm trying to use a formula to calculate the last column. I need the formula to look at the unique ID (column A) first before determining if it's before or after the call.

Please see below:

Unique IdentifierDay of EntryDay of call?Timing of Entry
1001Before Call
1002Before Call
1003YesDay of Call
1003YesDay of call
1005After Call
1006After Call
1007After Call
1011Before Call
1012YesDay of Call
1012YesDay of Call
1013After Call
1014After Call

<tbody>
</tbody>



<b2&and(c3=""),"before"),"after")

Any help would be greatly appreciated.

Thanks,
Matt</b2&and(c3=""),"before"),"after")
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try this

<table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:109.31px;" /><col style="width:76.99px;" /><col style="width:73.19px;" /><col style="width:95.05px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td >Unique Identifier</td><td >Day of Entry</td><td >Day of call?</td><td >Timing of Entry</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="text-align:right; ">100</td><td style="text-align:right; ">1</td><td > </td><td >Before Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="text-align:right; ">100</td><td style="text-align:right; ">2</td><td > </td><td >Before Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="text-align:right; ">100</td><td style="text-align:right; ">3</td><td >Yes</td><td >Day of Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="text-align:right; ">100</td><td style="text-align:right; ">3</td><td >Yes</td><td >Day of Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="text-align:right; ">100</td><td style="text-align:right; ">5</td><td > </td><td >After Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="text-align:right; ">100</td><td style="text-align:right; ">6</td><td > </td><td >After Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td style="text-align:right; ">100</td><td style="text-align:right; ">7</td><td > </td><td >After Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td style="text-align:right; ">101</td><td style="text-align:right; ">1</td><td > </td><td >Before Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td style="text-align:right; ">101</td><td style="text-align:right; ">2</td><td >Yes</td><td >Day of Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >11</td><td style="text-align:right; ">101</td><td style="text-align:right; ">2</td><td >Yes</td><td >Day of Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >12</td><td style="text-align:right; ">101</td><td style="text-align:right; ">3</td><td > </td><td >After Call</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >13</td><td style="text-align:right; ">101</td><td style="text-align:right; ">4</td><td > </td><td >After Call</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >D2</td><td >=IF(AND(C2="",COUNTIF(A2:$A$13,A2)<=COUNTIF($A$2:$A$13,A2),COUNTIFS(A2:$A$13,A2,C2:$C$13,"Yes")>0),"Before Call",IF(C2="Yes","Day of Call","After Call"))</td></tr></table></td></tr></table>
 
Upvote 0

Forum statistics

Threads
1,215,202
Messages
6,123,625
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top