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 693383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:44:54+00:00 2026-05-14T02:44:54+00:00

Hi I shall try to explain clearly what I need to be able to

  • 0

Hi I shall try to explain clearly what I need to be able to do, here goes:

I have an Excel spread sheet 1 with postcodes in column A and a number in column B. I need to create a macro/formula so that it will see the number (i.e 3) and copy and paste the postcode that number of times into sheet 2 column a underneath each other. I need to do this for the next row down etc until it comes to a blank.

Sheet 1

A       B
DE43PP  3
DE43PQ  8

Sheet 2

A       B
DE43PP
DE43PP
DE43PP
DE43PQ
...

Thanks

  • 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-05-14T02:44:54+00:00Added an answer on May 14, 2026 at 2:44 am

    Try this:

    Sub copyPostcodes()
        Dim c As Range
        Dim x As Long
        Dim y As Long
    
        y = 0
    
        For Each c In Sheets("Sheet1").Range("A:A").Cells
            If Len(c) > 0 Then
                For x = 1 To c.Offset(0, 1)
                    Sheets("Sheet2").Range("A1").Offset(y, 0) = c
                    y = y + 1
                Next x
            End If
        Next c
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is such a difficult question to explain online but I shall try my
I shall attempt to explain the scenario. I have a gridview I wish to
OK, this is impossible, but I will try to explain the situation here. Let's
I'll try to explain in detail what I need: I'm parsing an RSS feed
I'll try to explain the problem we have at my company the best I
I have a fairly complex database question to ask so I shall try and
Im working on a small application to try out an idea that I have.
I have a small script that I am try to port to work for
I have android device with root and i try to implement some small app.
I will try to explain this the best way I can, but feel free

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.