+ Reply to Thread
Results 1 to 2 of 2

Find non-blank cells and retrieve data at corresponding cells

Hybrid View

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Kaoshiung Taiwan
    MS-Off Ver
    Excel 2007
    Posts
    4

    Find non-blank cells and retrieve data at corresponding cells

    Hello,

    I tried to wriet an array formula as follows:

    =INDEX(A:A,SMALL(IF(MATCH(TRUE,LEN(I$1:I$15000)<>0,0),ROW(I$1:I$15000)),ROW(A2)))

    Basically I have data stored at columns from A column to I column, and I would like to search non-blank cells at column I and retrieve data at corresponding cells at A column and put those matched data at K column. For example, if I15 is a non-blank cell, then data at cell A15 will be retrieved and placed at K column.

    Anything wrong with the above formula? thanks for the help..

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Find non-blank cells and retrieve data at corresponding cells

    You could try this VBA... an array formula with that many cells will be slow. Try this (obviously on test data first!):
    Sub CopyA2K()
    Dim thisRow As Long
    For thisRow = 1 To 15000 'Change these numbers to match the range of rows you need changed.
        If Range("I" & thisRow).Value <> "" Then
            Range("K" & thisRow).Value = Range("A" & thisRow).Value
        End If
    Next
    End Sub
    - Moo
    Last edited by Moo the Dog; 11-17-2012 at 11:11 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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