Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Sunil Garg   on Jan 10 In MS Office Category.

  
Question Answered By: Abasi Massri   on Jan 10

If you array-enter (CTRL+SHIFT+ENTER) your function  [logarray(A1:A4)]
into a HORIZONATL range  (e.g. C5:F5), it will work perfectly.


BUT, if you want to use a VERTICAL range (e.g. B1:B4), you should
change the code line:

LogArray = new_array

to:

LogArray = Application.Transpose(new_array)


I tried both cases separately, and it worked for both types of
ranges. The key point is you get a horizontal array, and transpose it
to fit into a vertical range. It is a little modification. You do not
have to rewrite your code from scratch.

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on VBA and Arrays/Ranges Or get search suggestion and latest updates.


Tagged: