[VBA] Place x quantity of value in visible cells only

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
671
Office Version
  1. 2010
Platform
  1. Windows
Hi guys, let's say x is a variable of a value that I want placed in a variable number of visible cells after filtering.

How I do dis?

For posterity, the range I want the cells placed is in column BD, I'd want the values placed vertically so BD2, BD3, BD4 but only where visible. How do I place 860 values of x in the first 860 visible cells in column BD?

Thanks!
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
50,523
Office Version
  1. 365
Platform
  1. Windows
It got pretty complicated for somebody who is not very familiar with your data and requirement and you seemed to be making good progress yourself.
Is there a particular problem with what you have?
 

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.

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
671
Office Version
  1. 2010
Platform
  1. Windows
It got pretty complicated for somebody who is not very familiar with your data and requirement and you seemed to be making good progress yourself.
Is there a particular problem with what you have?

No, I just generally feel like the portion I've added to handle allocating 1,000 references when there's only, say, 545 records is a little messy and I think there may be a more elegant solution than counting the areas and cutting it short when I get to the final area.

Thanks again. It does work remarkably well and it's lightning fast. Our old allocation system used to take hours to do a few thousand rows and this can do tens of thousands instantly.
 

Forum statistics

Threads
1,141,059
Messages
5,704,034
Members
421,323
Latest member
Exidous

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
Top