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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:22:11+00:00 2026-05-19T23:22:11+00:00

I asked this question before, but had a hard time showing which edits I

  • 0

I asked this question before, but had a hard time showing which edits I made.

I wrote some code to scan through rows in Column 1… each time it comes across a unique room number, it fills in the blank cells below it with that number. Unfortunately, It’s only copying the first cell’s value (“1”) and pasting it into all rows 3 through 10.

The code I have is:
‘Fills in room number column with like room numbers:

AboveCellValue = Range("A3").Offset(-1, 0).Value
For RowIndex = 2 To 10
    For ColIndex = 1 To 1
        If Cells(RowIndex, ColIndex).Value = "" _
        Then Cells(RowIndex, ColIndex).Value = AboveCellValue
    Next ColIndex
Next RowIndex

Here is a pic of what is supposed to happen:
http://i802.photobucket.com/albums/yy304/Growler2009/AESProjectPic.jpg

Thank you for your help!
-Dan

  • 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-19T23:22:12+00:00Added an answer on May 19, 2026 at 11:22 pm

    Here’s another way that doesn’t loop. It puts a formula in every blank cell that references the cell above it.

    With Range("A2:A10")
        .SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
        .Copy
        .PasteSpecial xlPasteValues
    End With
    

    Change the Range to suit your data. Also, it assumes you don’t have any other formulas in that range. If you do, they will be converted to values and you probably don’t want that.

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

Sidebar

Related Questions

I had asked this question before, but I got no correct answer. So, this
This question has been asked before ( link ) but I have slightly different
I know this question has been asked before, but I ran into a problem.
I know this question has been asked a bit before. But looking around I
This has been asked before (question no. 308581) , but that particular question and
I know this specific question has been asked before , but I am not
It's quite possible a question like this has been asked before, but I can't
(I asked this question in another way , and got some interesting responses but
Before I asked this question I had a look through the search results for
This question has been asked before but 1) the user never accepted an answer

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.