Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8527931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:41:20+00:00 2026-06-11T08:41:20+00:00

I have written the code for getting the blank cell information but the problem

  • 0

I have written the code for getting the blank cell information but the problem is that I want to copy the data which are before the blank call. After the blank cell there might be a value. Here’s my code:

Set rng = Range("6:6").Find(What:=horiz, LookIn:=xlValues, LookAt:=xlWhole)    
If rng Is Nothing Then
    MsgBox "Value not found in row 1", vbExclamation
Else
    rng.EntireColumn.Copy
    Range("p1").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    MsgBox Range("C1").End(xlDown)(2, 1).Value
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:41:21+00:00Added an answer on June 11, 2026 at 8:41 am

    I can’t really see your data set, so hard to say this is bullet proof, but from what your post says, this may be what you need.

    Change

    rng.EntireColumn.Copy (which copies the entire column)

    to

    Range(rng, rng.end(xlDown)).Copy which copies the range from the found range to the last cell before a blank.

    If you want to copy all the cells above the found range, until you find a blank above, and all the cells below, write this:

    Range(rng.End(xlUp), rng.End(xlDown)).Copy

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a code which has Suite information with Test case information embedded
I have written following code for the client of RMI. But getting java.rmi.ConnectException: Connection
Code I have written involves getting the time waiting for 10 minutes and then
I have written code that opens 16 figures at once. Currently, they all open
I have written code to perform a function that could take a while to
I have written some code that loads an XML document using an XmlDocument object
I have written a code for taking JSON data from a PHP and putting
I have written some code for displaying a drop down list, but the code
I have written following code for getting location name : UseGpsActivity.java public class UseGpsActivity
I have written code for an animation that shakes a UIImageView on the screen,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.