Results 1 to 10 of 10

How to equate array variables to other array variables in a formula

Threaded View

  1. #1
    Registered User
    Join Date
    04-02-2015
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    47

    How to equate array variables to other array variables in a formula

    As seen in Example, I'm trying to convert FTNA to FTVA. They are the exact same size, but I am only trying to get the text within the brackets of FTNA. However, whenever I do this, all I get is "This is invalid". Can anyone tell me why?

    Sub Example()
    Dim mcfc As Worksheet
    Dim FCMC As Long
    Dim FTVA As Variant
    Dim FTNA As Variant
    Dim i As Long
    
    Set mcfc = Workbooks("PERSONAL.xlsb").Worksheets("Sheet1")
     
    FCMC = mcfc.Cells(1, Columns.Count).End(xlToLeft).Column
    
    FTNA = WorksheetFunction.Application.Transpose(WorksheetFunction.Application.Transpose(Range(mcfc.Cells(1, 1), mcfc.Cells(1, FCMC))))
    
        For i = 1 To FCMC
            FTVA(i) = Mid(" & FTNA(i) & ", InStr(" & FTNA(i) & ", "(") + 1, InStr(" & FTNA(i) & ", ")") - InStr(" & FTNA(i) & ", "(") - 1)
        Next i
    
    End Sub
    Attached Files Attached Files
    Last edited by Geode7; 05-13-2019 at 03:15 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Testing single code, work fine. Put multiple codes in one sheet, one code doesn't work.
    By MayDay1988 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2017, 06:14 PM
  2. [SOLVED] F4 doesn't work only in excel, how to make it work again?
    By Dave H in forum Excel General
    Replies: 1
    Last Post: 02-26-2014, 11:22 AM
  3. [SOLVED] Macro work in personal workbook, doesn't work in other workbooks
    By Centexcel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2013, 11:47 AM
  4. [SOLVED] Macro Doesn't Work Through Button, Does Work Through Developer ->Macros Option
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2013, 11:55 AM
  5. F2 doesn't work
    By mickey001 in forum Excel General
    Replies: 2
    Last Post: 10-21-2011, 03:28 PM
  6. Why doesn't this work ?
    By RAFAAJ2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2005, 03:05 PM
  7. why it doesn't work?
    By Demian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2005, 06:05 AM

Tags for this Thread

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