Convert formula into code

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello experts,
This is JohnnyL's code and I need some help to correct some issues and also add one line of code in the end to update the application.
I have tried to address the issue as simple as possible in the conditions sheet.
The formula to color the cells in the combined data sheet is set for 218 sheets in this file. The range of rows will vary each time from 100 to 20,000 rows in different scenarios. So, instead of writing the code for a fixed range, if the code can count the number of rows in the Combined data sheet it will be really cool.
The formula is for ____Under one Gstin number, in the combined data sheet color rows which have the same amounts repeated more than 2 times this formula color the cells (Color Yellow) from A: N if applied in CF. I have colored manually to show the result.
Rich (BB code):
=SUMPRODUCT(($C$2:$C$218=$C2)*($G$2:$G$218>$G2-1)*($G$2:$G$218<$G2+1)*($H$2:$H$218>$H2-1)*($H$2:$H$218<$H2+1)*($I$2:$I$218>$I2-1)*($I$2:$I$218<$I2+1))>2
Match Portal with 2B.xlsm
 

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.

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

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