+ Reply to Thread
Results 1 to 3 of 3

Set Cell to value 1...34

Hybrid View

Dennis Lavallee Set Cell to value 1...34 08-24-2006, 12:06 PM
protonLeah The VB code below may get you... 08-25-2006, 01:08 AM
Dennis Lavallee Thanks, I'll try it today.... 08-25-2006, 08:17 AM
  1. #1
    Registered User
    Join Date
    05-18-2006
    Posts
    13

    Set Cell to value 1...34

    Lots of looks no takers. May be the way I explained.

    COl A
    A2 8001
    A3 8014
    A4 8017
    A5 8173
    A6 8192
    .
    A35 8999
    Total 34 entries
    I want col B Cell 2 (B2) to = A2 on return from a Sub Incriment B2 to now = A3 etc until I have used last item.

    I have a list of 34 branchs that I want to create a report from.
    Branch numbers are like 8001, 8017 etc.. they are in a table.

    I had set up where you input 1 branch number and it was used in this formula. And I displayed the results on a seperate sheet.

    '=DCOUNTA(Closed!1:65536,"Actual Install Date Comp",AM2:AP6)
    where CELL AM2..AM6 looked at the cell the operator entered. (Note there are about 10 of these Dcounta statments that all get updated with the same input, I don't think that maters)

    I want to set say Cell C2 = branch 1, I will output the results then increment Cell 2 to the next branch number etc until the last entry is completed.


    Clear as mud ? LOL
    I'm still looking at the forum but can't see to find the right search for it.

    Thanks Dennis
    Last edited by Dennis Lavallee; 08-24-2006 at 04:39 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,953
    The VB code below may get you started; as is, it simply builds a new formula in cell C2 to step down successive rows of column A. The only hiccup is that you have to click a new cell each time to get it to work...
    -------------
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Static row As Integer
    row = row + 1
    Range("C2").Value = "=A" & row
    End Sub
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    05-18-2006
    Posts
    13
    Thanks, I'll try it today. Appriciate it very much.

    Is there any way when returning from another sub routine, which will copy and paste the results this gave to force a click,

    While this one has 34 entries I have 3 other tables that will do the same for a total of 115 entries. Shure would like to prevent hitting enter each time for that many.

    But you got me over my blind spot, I'm total amature at VB but love the power and trying to learn, even at my age learning is fun. (57) LOL.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1