Results 1 to 5 of 5

Trouble reading values from a two dimensional array

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    245

    Trouble reading values from a two dimensional array

    Good afternoon -

    Spending some time today working on my VBA skills and struggling with two diensional arrays. Thanks in advance for any help.

    Simply put, I'm trying to compare values in column A with values in a 2D array. When there is a match, I want to turn the value in column A to a bold font. Here's my code and attached is my practice workbook.

    
    Sub Practice8()
    
    'THE PURPOSE IS TO COMPARE THE VALUES IN COLUMN A WITH THE _
    VALUES IN THE ARRAY (i.e., Sheet2, Range C1:D3) AND WHENEVER A _
    MATCH IS FOUND, TURN THE VALUE IN COLUMN A TO BOLD
    
    Dim Arr() As Variant
    Arr = Range("C1:D3")
    Dim r As Long
    Dim c As Long
    
    With Sheet2
    
        For r = 1 To UBound(Arr, 1)
            For c = 1 To UBound(Arr, 2)
                  
             Next c
            
        Next r
        
    Dim i As Long
    Dim Rows As Long
    
        For i = 1 To 4
    
            If Cells(i, 1) = (r) & (c) Then
            Cells.Font.Bold = True
                             
            End If
    
        Next i
    
    End With
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help converting one-dimensional array to multi-dimensional array
    By puzzlelover22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2016, 06:48 AM
  2. Parse Data from one dimensional array into a 2 dimensional array.
    By JapanDave in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2016, 07:29 AM
  3. [SOLVED] Array formula: Automatically create a series of values for a one-dimensional matrix
    By bbozze in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-11-2014, 07:48 AM
  4. [SOLVED] List most common text values from a two-dimensional array
    By alienss in forum Excel General
    Replies: 2
    Last Post: 10-11-2012, 09:53 AM
  5. Extract unique values and their count from a two dimensional Array
    By shahirslmn in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-17-2012, 09:37 PM
  6. Creating a 2-dimensional array from a 1-dimensional list
    By guywithcamera in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2008, 06:34 PM
  7. permutation of values in 2 dimensional array
    By bashir.zain@googlemail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2006, 03:40 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