+ Reply to Thread
Results 1 to 4 of 4

Formatting excel sheet

  1. #1
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    2

    Formatting excel sheet

    Hi

    i will try to explain best i can and i have attached a sheet

    the column highlighted in yellow follows a sequential number system e.g, 1, 2, 3, 4 etc etc

    These sheets can get very long and i can have quite a few. it takes me ages to number these up and when i insert a new row i have to re-number all the ones below manually.

    is there a formula that will look to see if column G is filled out and if so put the next number is from the one below.

    the main problem is that when there is spaces and therefore these cells would be blank?

    many thanks for your help - this will save so much time if i could solve this

    thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Formatting excel sheet

    scottapple,

    Please see if this is what you need.
    In Cell A11 copy this equation and paste down as far as you needed it.
    PHP Code: 
    =IF(G11="","",COUNT($G$11:G11)) 

  3. #3
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Formatting excel sheet

    thanks - perfect!

  4. #4
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Formatting excel sheet

    Hi Scott
    An alternative is to run a macro. Cut and paste this macro into a module in your workbook and run it each time you insert news rows:

    Sub ReNumber()
    Dim Rows As Integer
    Dim rw, ItemNo
    ItemNo = 1
    Rows = ActiveSheet.UsedRange.Rows.Count - 1
    'MsgBox (Rows)
    For Count = 8 To Rows
    Range("A" & Count).Select
    rw = Range("G" & Count).Value
    If rw = "" Then
    GoTo NextRow
    End If
    Range("A" & Count) = "5.N." & ItemNo
    ItemNo = ItemNo + 1
    NextRow:
    Next Count
    End Sub

    Good luck.
    Tony

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formatting the excel sheet
    By Wayne Johnson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2013, 09:39 AM
  2. [SOLVED] Help with formatting excel sheet and using the cell reference
    By armen1er in forum Excel General
    Replies: 5
    Last Post: 07-09-2013, 02:56 PM
  3. [SOLVED] Help color formatting excel sheet
    By mcranda in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2013, 11:58 AM
  4. Conditional formatting of excel sheet from SAP
    By AMKa in forum Excel General
    Replies: 1
    Last Post: 11-21-2011, 11:25 PM
  5. [SOLVED] Formatting a excel sheet that has been created using DTS.
    By Russell in forum Excel General
    Replies: 1
    Last Post: 01-20-2005, 07:06 PM

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