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:

[TABLE="class: cms_table_grid, width: 500"]
<tbody>[TR]
[TD]Unique Identifier[/TD]
[TD]Day of Entry[/TD]
[TD]Day of call?[/TD]
[TD]Timing of Entry[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]Before Call[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]Before Call[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]3[/TD]
[TD]Yes[/TD]
[TD]Day of Call[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]3[/TD]
[TD]Yes[/TD]
[TD]Day of call[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]After Call[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]6[/TD]
[TD][/TD]
[TD]After Call[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]7[/TD]
[TD][/TD]
[TD]After Call[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]Before Call[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]2[/TD]
[TD]Yes[/TD]
[TD]Day of Call[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]2[/TD]
[TD]Yes[/TD]
[TD]Day of Call[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]After Call[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]After Call[/TD]
[/TR]
</tbody>[/TABLE]



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

Any help would be greatly appreciated.

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

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

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