+ Reply to Thread
Results 1 to 5 of 5

add one to cell below

  1. #1
    jburch
    Guest

    add one to cell below

    I am trying to create an inventory sheet -

    Column A - Part Number (always the same) (ex. 10-0A in cell 2A)
    Column B - Serial Number (needs to add 1 every new cell (ex. 0001 in cell B2
    and needs to be 0002 in cell B3))
    Column C - Invoice Description
    Column D - Product Details

    Is it possible to only add a new line when you start typing 10-0A in cell A3
    and have the serial number column B add 1 to be 0002 in that column?

    PART NUMBER SERIAL NUMBER INVOICE DESCRIPTION
    10-0A 0001

    If i click the cell below 10-0A and start typing is it possible to
    automatically in the cell under the 0001 in the serial number column to add
    +1 to make it 0002?

    Thanks,




  2. #2
    Mark Lincoln
    Guest

    Re: add one to cell below

    I would do this:

    Format your column B cells as "0000" in order to see leading zeros.

    in B3, type in the following formula:

    =IF(A3<>"",B2+1,"")

    Copy this formula down Column B as far as you need to.


  3. #3
    jburch
    Guest

    Re: add one to cell below

    Thank you very much!

    jburch

    "Mark Lincoln" wrote:

    > I would do this:
    >
    > Format your column B cells as "0000" in order to see leading zeros.
    >
    > in B3, type in the following formula:
    >
    > =IF(A3<>"",B2+1,"")
    >
    > Copy this formula down Column B as far as you need to.
    >
    >


  4. #4
    jburch
    Guest

    Re: add one to cell below

    Is there a way for when i print this if only 4 products are on the page to
    automatically hit print and not have extra pages print?

    "Mark Lincoln" wrote:

    > I would do this:
    >
    > Format your column B cells as "0000" in order to see leading zeros.
    >
    > in B3, type in the following formula:
    >
    > =IF(A3<>"",B2+1,"")
    >
    > Copy this formula down Column B as far as you need to.
    >
    >


  5. #5
    Mark Lincoln
    Guest

    Re: add one to cell below

    I've amended this a bit from one of my own macros. Some of the experts
    on this list might have a more elegant solution. But having said
    that....

    This assumes no empty rows in the data range.

    Dim c as Range
    Dim LastRow as Integer
    Dim PrintRange as String

    Sub PrintDataUnits()
    For Each c In Range("A2:A5000").Cells
    If (c.Value) = "" Then
    LastRow = LTrim(Str(c.Row - 1))
    Exit For
    End If
    Next
    PrintRange = "A1:F" & LastRow ' <---Change F to match your last
    column
    If LastRow <> "1" Then Range(PrintRange).PrintOut
    End Sub

    Hope this helps.


+ 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