Excel Formula help

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
976
Office Version
  1. 2010
Platform
  1. Windows
Code:
Hi Team,

I am looking for excel formula in C2/VBA here


My task is count the trade processed yesterday, and reallocate between reviewer
in such a way that he should not get same trade already worked. if the count is odd
its ok if we allocate the trade extra to someone.


This is my daily task and trades will be around 400, currently doing manually through filter.

Below is the Table,

[TABLE="width: 192"]
 <colgroup><col width="64" style="width:48pt" span="3"> </colgroup><tbody>[TR]
  [TD="width: 64, bgcolor: #000000"][FONT=Calibri][SIZE=3][COLOR=#ffffff]A[/COLOR][/SIZE][/FONT][/TD]
  [TD="width: 64, bgcolor: #000000"][FONT=Calibri][SIZE=3][COLOR=#ffffff]B[/COLOR][/SIZE][/FONT][/TD]
  [TD="width: 64, bgcolor: #000000"][FONT=Calibri][SIZE=3][COLOR=#ffffff]C[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: #FFFF00"][FONT=Calibri][SIZE=3][COLOR=#000000]Trade id[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FFFF00"][FONT=Calibri][SIZE=3][COLOR=#000000]Reviewer[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FFFF00"][FONT=Calibri][SIZE=3][COLOR=#000000]Allocate[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]1669689[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FABF8F"][FONT=Calibri][SIZE=3][COLOR=#000000]Ajay[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FABF8F"][FONT=Calibri][SIZE=3][COLOR=#000000]Vishal[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]1503177[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FABF8F"][FONT=Calibri][SIZE=3][COLOR=#000000]Ajay[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FABF8F"][FONT=Calibri][SIZE=3][COLOR=#000000]Vishal[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]925596[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FABF8F"][FONT=Calibri][SIZE=3][COLOR=#000000]Ajay[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FABF8F"][FONT=Calibri][SIZE=3][COLOR=#000000]Vishal[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]1083341[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FFC000"][FONT=Calibri][SIZE=3][COLOR=#000000]Ajay[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FFC000"][FONT=Calibri][SIZE=3][COLOR=#000000]Sachin[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]2554309[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FFC000"][FONT=Calibri][SIZE=3][COLOR=#000000]Rahul[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FFC000"][FONT=Calibri][SIZE=3][COLOR=#000000]Sachin[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]1377544[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FFC000"][FONT=Calibri][SIZE=3][COLOR=#000000]Rahul[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #FFC000"][FONT=Calibri][SIZE=3][COLOR=#000000]Sachin[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]1950750[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #538DD5"][FONT=Calibri][SIZE=3][COLOR=#000000]Sachin[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #538DD5"][FONT=Calibri][SIZE=3][COLOR=#000000]Rahul[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]1559001[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #538DD5"][FONT=Calibri][SIZE=3][COLOR=#000000]Sachin[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #538DD5"][FONT=Calibri][SIZE=3][COLOR=#000000]Rahul[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]1035420[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #538DD5"][FONT=Calibri][SIZE=3][COLOR=#000000]Sachin[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #538DD5"][FONT=Calibri][SIZE=3][COLOR=#000000]Rahul[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]893850[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #00B050"][FONT=Calibri][SIZE=3][COLOR=#000000]Vishal[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #00B050"][FONT=Calibri][SIZE=3][COLOR=#000000]Ajay[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]2887228[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #00B050"][FONT=Calibri][SIZE=3][COLOR=#000000]Vishal[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #00B050"][FONT=Calibri][SIZE=3][COLOR=#000000]AJAY[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
 [TR]
  [TD="bgcolor: transparent, align: right"][FONT=Calibri][SIZE=3][COLOR=#000000]2883978[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #00B050"][FONT=Calibri][SIZE=3][COLOR=#000000]Sachin[/COLOR][/SIZE][/FONT][/TD]
  [TD="bgcolor: #00B050"][FONT=Calibri][SIZE=3][COLOR=#000000]AJAY[/COLOR][/SIZE][/FONT][/TD]
 [/TR]
</tbody>[/TABLE]
<strike></strike>

Thanks.
Mallesh
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Sounds like it could be a lot easier to rotate tasks down a list.

For example, lets number the Reviewers as such: Ajay = 1, Rahul = 2, Sachin = 3 and so forth. Then for each day, every Trade ID is assigned to a number, which correlates to a specific person. Then the next day, you simply loop through the number system to the next person as such:

Trade ID 1669689 was assigned to Person 1 (Ajay) on Monday (day 1). Then, on Tuesday (day 2), Trade ID 1669689 would be assigned to Person 2 (Rahul).

Once you come to the end of the list (say there are 7 people on the list). Trade ID 1669689 would be assigned to Person 7 ("Bob") on Tuesday of the next week (day 7). The following Wednesday, we would loop it back to Person 1.

In this way, you could organize your list of trades as such:


[TABLE="width: 587"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[/TR]
[TR]
[TD="align: center"]Trade id[/TD]
[TD="align: center"]Reviewer #[/TD]
[TD="align: center"]Allocate #[/TD]
[TD="align: center"]Allocate Name[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Person[/TD]
[TD="align: center"]Name[/TD]
[/TR]
[TR]
[TD="align: center"]1669689[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Rahul[/TD]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Ajay[/TD]
[/TR]
[TR]
[TD="align: center"]1503177[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Rahul[/TD]
[TD="align: center"][/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Rahul[/TD]
[/TR]
[TR]
[TD="align: center"]925596[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Rahul[/TD]
[TD="align: center"][/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Sachin[/TD]
[/TR]
[TR]
[TD="align: center"]1083341[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Rahul[/TD]
[TD="align: center"][/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]Vishal[/TD]
[/TR]
[TR]
[TD="align: center"]2554309[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Sachin[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]Sally[/TD]
[/TR]
[TR]
[TD="align: center"]1377544[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Sachin[/TD]
[TD="align: center"][/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]James[/TD]
[/TR]
[TR]
[TD="align: center"]1950750[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]Vishal[/TD]
[TD="align: center"][/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]Bob[/TD]
[/TR]
[TR]
[TD="align: center"]1559001[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]Vishal[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]1035420[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]Vishal[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]893850[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]Sally[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2887228[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]Sally[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2883978[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]Vishal[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Note that the formula in cell C2 (and the rest of C, accordingly)

=IF(B2=MAX(F:F), 1, B2+1)

and the formula in column D is a simple VLOOKUP to pull the name of the associate.

Such a system allows for the addition/removal/edits of a team.
 
Upvote 0
Hi Jacob/Team

Thanks for such a quick response and your precious time on it, have to test it.

There are 4-5 people max -work on it , Column A is not relevant to me, Take total of column B,
Divide it by 5, in column C2 apply such a formula Ajay-Ajay should not come and so on.


Thanks in advance

Regards,
Mallesh
 
Upvote 0
Hi Mallesh,

I'm not following your last message. There are 4-5 people max, so that's good.

What do you mean by "total of column B" and dividing by 5?

Please clarify.

thanks!
 
Upvote 0
Thanks Jacob once again ,

Column B contain list of persons name say in range ("B2:B101")

So total cell count is 100 here. and unique Name in that range are 5 people,
Unique names will be, (Sachin,Raju,Vishal,Ajay,Rahul)

I Filter Column B, unselect all and then select Ajay & in Column C
Infront of Ajay I type Vishal for filtered range

Afterwords, remove the filter again apply filter unselect all and then select Rahul
Infront of Rahul in Column C I type Sachin for filtered range . and so on

like this I allocate the trade 20..


Thanks.
Mallesh
 
Upvote 0

Forum statistics

Threads
1,223,157
Messages
6,170,419
Members
452,325
Latest member
BlahQz

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