Copy Formula down thousands of rows

Batman77

New Member
Joined
Aug 1, 2013
Messages
7
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hi Team,

Looking to know if there is an easier way to copy down a formula through 100K+ of rows without causing excel to give up and die quietly.

For example I am using this formula =IF(COUNTIF($Q$2:$170621,Q170621)>1,"Y","N")

Any help will be greatly appreciated as I have a bit doing this long way copy 1-2k at a time o_O
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Correction to formula used above is: =IF(COUNTIF($Q$2:$Q170621,Q170621)>1,"Y","N")
 
Upvote 0
Hi Team,

Looking to know if there is an easier way to copy down a formula through 100K+ of rows without causing excel to give up and die quietly.

For example I am using this formula =IF(COUNTIF($Q$2:$170621,Q170621)>1,"Y","N")

Any help will be greatly appreciated as I have a bit doing this long way copy 1-2k at a time o_O
will this do?
Code:
Sub fillcells()
Range("B2:B" & 170621) = "=IF(COUNTIF($Q$2:$Q170621,Q170621)>1,""Y"",""N"")"
End Sub
 
Upvote 0
Thanks Mirabeau :-) However this does not work unfortunately o_O

So the formula should continue as a series down the column as in:

Cell X2=IF(COUNTIF($L$2:$L2,L2)>1,"Y","N")
Cell X3=IF(COUNTIF($L$2:$L3,L3)>1,"Y","N")
Cell X4=IF(COUNTIF($L$2:$L4,L4)>1,"Y","N")
...all the way down to whatever the last cell is, which in this case is: Cell X174281=IF(COUNTIF($L$2:$L174281,L174281)>1,"Y","N")

I am not that good with VBA so not sure how one would be able to tweak your suggestion.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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