VBA - Copy values that are not blank or "" from an array and paste into another range

mateinone

New Member
Joined
Feb 1, 2012
Messages
20
Office Version
  1. 2016
Platform
  1. Windows
okay so I have an array it has 3 columns and it is in a defined name range error_tbl
The location is on the sheet "errors" and the range is (A2:C26)

The first column has the values 1-25 in numerical order.
The second column performs an if statement and returns a value or "" and the third column checks the value of the 2nd column and if it is not "" then it performs a vlookup for a corresponding value, otherwise it also has ""

What I want to do is have a range on another sheet that runs a report when requested to get the values in "error_tbl" where the 2nd (or 3rd) column is not "" or blank and past them into a range in a new sheet.
Destination sheet is "reports" range for report is M1:P26.

I know there is a way to do this in some sort of formula using I think indexing, but I cannot recall how to do this, but also I only want the date to show when it is triggered by an "run_err_rpt" macro

I hope this information is enough to go by, but more than happy to supply any more information if required.

thanks very much in advance
 

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,585
Messages
6,120,390
Members
448,957
Latest member
Hat4Life

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