Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

find text then copy a range

Posted on 2014-12-22
2
Medium Priority
?
57 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
Norie earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

636 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