PDA

View Full Version : Filtering a Range into another Range



heedaf
03-07-2019, 01:27 PM
I'm trying to figure out how to basically do the following theory:


dim Rng as range
dim FiltRng as range

set Rng = Worksheets("Sheet1").Range("C16:C51")

set FiltRng = filter(Rng, "a")

Where the Rng now contains all cells that have an "a" contained in it. I'm able to do this with an array but I would really like to retain the details of the original cell.

大灰狼1976
03-07-2019, 06:13 PM
Hi heedaf!
Filter() applies only to one-dimensional arrays.
But there are other ways to solve this problem.
Please simulate the data and results.

heedaf
03-07-2019, 08:13 PM
I just added a filter for an example of the concept. An example, c16: c51 could have dates and I would like to filter on a range of dates (or single date) and then be able to access all the information about the filtered cell (font, color, location etc.). I've tried advanced filter and auto filter but I can't figure out how to prevent the sheet from being modified.