+ Reply to Thread
Results 1 to 3 of 3

Array problems ... need help

  1. #1
    Registered User
    Join Date
    02-13-2019
    Location
    Chillicothe, IL
    MS-Off Ver
    Office 2016
    Posts
    1

    Array problems ... need help

    Hey folks! New here but I'll dive right in:

    Here's a bit of code driving me crazy:

    Dim Coef(1 To 2, 1 To 2) As Double
    Dim a_b(1 To 2, 1 To 2) As Double
    Dim b_b(1 To 2) As Double
    Dim c_b(1 To 2) As Double
    Dim D(1 To 2) As Double
    Dim F(1 To 2) As Double

    Coef(1, 1) = Del1 * W1
    Coef(1, 2) = Del1 * Del1
    Coef(2, 1) = ((A2 - B2) * Del1 * W1 * W1 + Del1 * Del1)
    Coef(2, 2) = ((A2 - 2 * B2 + 1) * Del1 * Del1 * W1)
    ActiveSheet.Range("L4") = Coef(1, 1)
    ActiveSheet.Range("L5") = Coef(1, 2)
    ActiveSheet.Range("L6") = Coef(2, 1)
    ActiveSheet.Range("L7") = Coef(2, 2)
    D(1) = B1 / A1
    D(2) = C2 * W1
    ActiveSheet.Range("L8") = D(1)
    ActiveSheet.Range("L9") = D(2)

    F = WorksheetFunction.MMult(WorksheetFunction.MInverse(Coef), D) 'hiccups on this statement … compiler error "Can't assign to array"
    K1(istage) = F(1)
    K2(istage) = F(2)

    I've checked to see that all of the array variables have valid values ... I have more trouble with this kinf of thing than anything else! help?!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Array problems ... need help

    Try changing
    Please Login or Register  to view this content.
    to just
    Please Login or Register  to view this content.
    Failing that, ...

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.


    Please note:

    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Array problems ... need help

    In addition to the code tags omitted from your thread, you have not informed us of any crosspostings you have. Please repair your thread to include all crosspostings and enclose your code in code tags. Please take a few minutes to read and understand the forum rules you agreed to when you joined.

    Look here for an understanding of crosspostings.

    https://www.excelguru.ca/content.php?184

    Note: No further help to offered this OP until these moderation requests are fulfilled.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems with tranposing an array in VBA
    By CostCare in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-12-2016, 02:44 PM
  2. array / vb problems
    By thebigmancometh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-02-2009, 12:28 PM
  3. Dynamic Array Problems
    By l8sk8r in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2008, 05:54 AM
  4. Problems Using Array with 2007
    By Thomaswharper in forum Excel General
    Replies: 1
    Last Post: 07-28-2008, 03:37 PM
  5. Problems with array formula
    By manan in forum Excel General
    Replies: 4
    Last Post: 06-01-2006, 03:50 PM
  6. Problems with Array
    By systemx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2005, 09:45 AM
  7. [SOLVED] Problems Converting 1-D Array to 2-D Array
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-27-2005, 08:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1