VBA Dynamic cell entry from earlier statement

whitethorn

New Member
Joined
Jun 20, 2018
Messages
3
Hi All,

I am trying to use the following to define the first and last value of an entered array (partial code shown below). is there a way to make this work?

Code:
For j = 1 To finalrow3
    
    For l = 1 To 200
        If base(j, 1) = firstlast(l, 2) And Year(dates(j, 1)) <= firstlast(l, 1) And Year(dates(j, 2)) >= firstlast(l, 1) Then
            first = firstlast(l, 3)
            last = firstlast(l, 4)
        End If
        
                        b() = Capacity.Range(Cells(first, H), Cells(last, H))
                        bil() = Capacity.Range(Cells(first, i), Cells(last, O))
                        mh() = Capacity.Range(Cells(first, W), Cells(last, X))

thanks in advance
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Cross posted https://www.excelforum.com/excel-programming-vba-macros/1235074-dynamic-entered-array-values.html

Cross-Posting
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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