Assigning an Array value from one worksheet to a cell in another worksheet

DonEB

Board Regular
Joined
Apr 26, 2016
Messages
128
Office Version
  1. 2019
Platform
  1. Windows
I've spent some time searching on the internet how to handle this issue but I think I may be phrasing the questions or issue incorrectly and I have not been able to find any material on how to handle. So... here my simple problem:

I have create an array (array_Chart10a) located in a worksheet called TeamSelection2 within the following cells: G7:J501.

I'm attempting to take the value located in G7 and place it in cell AQ4 which is located within another worksheet called TeamSelection.

Because I need to examine/analyze information in the first few lines, I am performing this while doing a "While Counter1 < 20" loop. As a result, I have attempted to use the following code:

Sheets("TeamSelection").Range("AQ4").Value = Sheets("TeamSelection2").array_Chart10a(Counter1,1)

I get a "Run-Time Error: "438", Object doesn't support this property or method.

I'm stumped... any help will be appreciated.

Thanks,
Don
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Provided the array is already defined in some code line above, like
array_Chart10a =Sheets("TeamSelection2").Range("G7:J501").Value

you can simply use
Sheets("TeamSelection").Range("AQ4").Value = array_Chart10a(Counter1,1)

M.
 
Last edited:
Upvote 0
Thank you "M".

After scanning back through my code, I discovered that I failed to correctly define my array. Once I did that... the coding you provided worked as I had hoped it would.

Thanks again!!
Don
 
Upvote 0

Forum statistics

Threads
1,215,894
Messages
6,127,619
Members
449,390
Latest member
joan12

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