VBA macro: Copy to clipboard table range up to 0 in first column as criteria

Josu

New Member
Joined
Mar 2, 2021
Messages
39
Office Version
  1. 2010
Platform
  1. Windows
Hello everyone:)
Maybe someone can share with an idea of macro, which will copy specific cell range to clipboard based on criteria of one column (if cell value is 0, copy to clipboard up to that 0)
Basically small example below, i need to copy all range from A4 to C12, so 12 rows, because row 13 in column A has 0. I am doing this manually, but it's takes for this to scroll down and i do this many times per day.
I tried hide cells with zero,but with ctr-shift-arrow down still takes hidden zeros
If there this can help for solution, in all of that cells is equal formula for some hidden cells. I don't know how make equal formula to leave cell blank is that hidden cell is also blank, it shows 0 :(
Thanks i advance, hopefully my explanation is clear


Book1
ABC
2ABC
3
4123
5224
6325
7426
8527
9628
10729
118210
129211
130
Sheet1
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
If you use macro to find last row like xRow = Range("A" & Rows.Count).End(xlUp).Row you will get 13 as expected. Then just minus one from that eRow to get the last row.
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,255
Members
448,879
Latest member
oksanana

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