Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 06-17-2021, 09:43 AM
rollis13's Avatar
rollis13 rollis13 is offline auto fill numbers Windows 10 auto fill numbers Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 143
rollis13 will become famous soon enough
Default

This does the job:
Code:
Sub test()
    Dim x      As Long
    Dim y      As Long
    Dim cl    As Long
    Dim rw    As Long
    Dim cnt    As Long
    cnt = 1
    cl = Cells.Find("*", , , , xlByColumns, xlPrevious).Column
    rw = Cells.Find("*", , , , xlByRows, xlPrevious).Row
    For x = 1 To cl
        For y = 2 To rw
            If Cells(y, x) <> "" Then Cells(rw + cnt, cl - x + 1) = Cells(y, x) + 1
            cnt = cnt + 1
        Next y
        cnt = 1
    Next x
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
auto fill up mare1984 Word 1 06-27-2019 08:09 PM
auto fill numbers Auto Fill Forms pgilbert0824 Excel 2 10-30-2016 01:02 AM
auto fill numbers Excel Auto-fill Issues officeboy09 Excel 8 01-14-2014 05:52 PM
auto fill a word doc from another program hcubed Office 0 06-19-2013 09:42 PM
auto fill numbers Auto Color Fill Question Kinar Excel 3 05-14-2013 07:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft