If >=4 transaction based on date, if there are <=4 cell's that "S", use the top values to make cell "R"

manloonw

New Member
Joined
Mar 18, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi all, sorry the title is abit confusing.

I have the following headings:

Date, Value, R/S, Commission

I am trying to set the formula's the following rules for the R/S column.

1 If there are less than four transactions per day, all R/S cells belonging to the transaction must = R
2 If there are more than four transactions per day, at top four transaction must be = R based on value column.
Example there are 6 transaction dated 18/3/21, two of them are already R and I need the another two cells to change to R based on their highest value

I currently have the formula as If(countif(A:A,A2)<=4,"R","")

Any help would be appreciated
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Welcome to the Board!

Put this formula in cell A2 and copy down, and I think it should handle both situations:
Excel Formula:
=IF(COUNTIF(A$2:A2,A2)<=4,"R","")
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,047
Members
449,064
Latest member
scottdog129

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