+ Reply to Thread
Results 1 to 4 of 4

How to put 1. serial no. for rows with gaps

  1. #1
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    How to put 1. serial no. for rows with gaps

    Workbook Question3 has a sheet "DATA" which has entries in B Column.

    Example desired output is given in sheet "Results"

    I need to do 3 works.

    1. To put serial number for each each name, in A Column.
    2. I need to fill C Column with "1" for each name.
    3. if S/O (son of) is found anywhere in B column, corresponding D column should be marked with 1. If if W/O (wife of) is found anywhere in B column, corresponding D column should be marked with 2. If

    How to do this. Thanks in advance.
    Attached Files Attached Files
    Ask me how to hate XL.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to put 1. serial no. for rows with gaps

    Try these:

    A2 =IF(B2="","",COUNTA(B$2:B2))

    C2 =IF(B2="","",1)

    D2 =IF(B2="","",IF(COUNTIF(B2,"*S/O*"),1,2))

    If it is possible for a cell in column B to not have S/O or W/O then you can use this in D2 instead:

    =IF(B2="","",IF(COUNTIF(B2,"*S/O*"),1,IF(COUNTIF(B2,"*W/O*"),2,"No gender specified")))
    Last edited by 63falcondude; 05-27-2017 at 09:01 AM.

  3. #3
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: How to put 1. serial no. for rows with gaps

    Quote Originally Posted by 63falcondude View Post
    Try these:
    Perfect solution. Thanks for great help.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to put 1. serial no. for rows with gaps

    Quote Originally Posted by jilaba View Post
    Perfect solution. Thanks for great help.
    You're welcome. Happy to help.

+ 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. How to insert serial numbers for rows with gaps in between them
    By terry3218 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-15-2015, 03:34 PM
  2. [SOLVED] Paste rows with gaps between them in certain order (VBA)
    By limebaish in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-31-2013, 05:56 PM
  3. [SOLVED] Excel 2007 : Filter Report + Rows With Gaps?
    By benoj2005 in forum Excel General
    Replies: 2
    Last Post: 07-12-2012, 11:15 AM
  4. [SOLVED] Charting Date Gaps as Gaps
    By reactant in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 07-10-2012, 12:42 PM
  5. [SOLVED] Need to show rows w/ certain data on 2nd sheet with no gaps
    By Billbo in forum Excel General
    Replies: 4
    Last Post: 05-10-2012, 02:44 AM
  6. [SOLVED] Copying rows across to leave no gaps
    By FooFighter616 in forum Excel General
    Replies: 3
    Last Post: 05-01-2012, 08:18 AM
  7. Finding gaps within rows of numbers
    By bd528 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-24-2011, 12:35 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