Excel VBA Code that References Custom Range within Formula

acool

Board Regular
Joined
Feb 10, 2023
Messages
107
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I am currently trying to create some lines of code that will enable me to create two custom ranges. For my first range, I would like to reference A3: Last Row in Column A and extend that to Column C from Worksheet "Full Data Pull". For my Second Range, I would like reference B3: To Last Row where column A ends on "Full Data Pull". After creating these two custom ranges, I would like to implement these custom ranges into my Take/Sort Formula provided below. Instead of 'data (2)R3C1:R285C15, I would like to substitute this with "Rng." Similarly, instead of using 'data(2)! R3C2:R285C2, I would like to use "Rng2." If anyone could please provide some insight into the best way to incorporate my custom ranges into my take/sort/Filter formula, that would be greatly appreciated. Thank YoUu!


1688412729828.png
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
What does Rng.Address(ReferenceStyle:=xlR1C1) give you? It should be the string that you can use in building that formula.
 
Upvote 0

Forum statistics

Threads
1,215,274
Messages
6,123,993
Members
449,137
Latest member
abdahsankhan

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