Solved

find text then copy a range

Posted on 2014-12-22
2
51 Views
Last Modified: 2014-12-22
Hello experts. not been able to find the exact code I need so looking for your help, again

I need to find the word Counterparty Code in column A and then from that point copy A-D to the last cell that is not blank

so if Counterparty Code is found in A7 and the last non-blank cell is A200 I need to copy the range A7 to D200

many thanks
0
Comment
Question by:Jagwarman
2 Comments
 
LVL 33

Accepted Solution

by:
Norie earned 500 total points
ID: 40512795
Perhaps.
Dim Res As Variant

    Res = Application.Match("Counterparty Code", Columns(1), 0)

    If Not IsError(Res) Then
        Range("A" & Res, Range("A" & Rows.Count).End(xlUp)).Resize(,4).Copy
    End If

Open in new window

0
 

Author Closing Comment

by:Jagwarman
ID: 40512995
many thanks Have a great Christmas and New Year
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 7 Share with concurrent edits(Excel) 3 33
Want to create a userform that looks like the image provided 10 44
Excel Formula 4 28
splitting text of cell to columns 14 24
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now