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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:05:12+00:00 2026-05-23T04:05:12+00:00

This time, I have a cell holding a natural number, let’s say 10. Starting

  • 0

This time, I have a cell holding a natural number, let’s say 10. Starting from another cell and for the 9 columns to the right of it, I want to display the numbers 1 through 10. If my reference cell held 20, however, I want to start at the other cell and display the numbers 1 through 20 in 20 columns. I hope you get the gist.

Is there a good way to do this, first of all, without VBA? If not, is there a good way to do this with VBA? Is there some event I should catch on a cell which would allow me to then manually insert the values I want? My knowledge of Excel and VBA is not very good, so sorry if the question is an easy one.

Thank you all in advance!

  • 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-23T04:05:13+00:00Added an answer on May 23, 2026 at 4:05 am

    You won’t be able to use a UDF since values are changed in more than one cell. So the easiest way (with VBA) is probably with the Change event. If the value is in the named range “holdvalue” and you want to start the numbers at range “valueStart” then this will work:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    Dim i As Integer
    
    If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
    
    If Target.Address = Range("holdvalue").Address Then
      For i = 1 To Range("holdvalue")
        Range("valueStart").Offset(0, i - 1) = i
      Next i
    End If
    
    End Sub
    

    Note: This doesn’t deal with clearing the values.

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

Sidebar

Related Questions

I have a cell that takes the time value from another cell. I want
This time I have an error which I have been trying again to figure
this time i have a simple question: I have one table, related with himself
I used to configure boost already, but this time I have no idea what
this time it's about Ruby On Rails. I have a form in the view
hopefully a pretty simple question this time. I have a Select method in a
I have a query now that shows me all the calls between this time,
I'm re-asking this question but with a different framework this time. I have two
It seems I tend to attract strange issues. This time, I have written a
This is the first time I have manipulated hashes and arrays in this way

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.