+ Reply to Thread
Results 1 to 4 of 4

Formula to insert shift daywise

  1. #1
    Registered User
    Join Date
    05-01-2014
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    2

    Formula to insert shift daywise

    Hi - I have a set of rows which has column 'shift' missing. I need to fill the column 'shift' based on the date, for example -

    # Date Shift
    1 01/04/2014 A
    2 02/04/2014 A
    3 02/04/2014 B
    4 03/04/2014 A
    5 03/04/2014 B
    6 03/04/2014 C
    7 04/04/2014 A
    8 04/04/2014 B


    etc.


    Kindly help to write a formula for filling in the shifts for every dates.

    Thanks
    MK

  2. #2
    Registered User
    Join Date
    06-25-2013
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: Formula to insert shift daywise

    Quote Originally Posted by akashmenon View Post
    Hi - I have a set of rows which has column 'shift' missing. I need to fill the column 'shift' based on the date, for example -

    # Date Shift
    1 01/04/2014 A
    2 02/04/2014 A
    3 02/04/2014 B
    4 03/04/2014 A
    5 03/04/2014 B
    6 03/04/2014 C
    7 04/04/2014 A
    8 04/04/2014 B


    etc.


    Kindly help to write a formula for filling in the shifts for every dates.

    Thanks
    MK
    Based on your data, I used this formula:

    =IF(A3=A2,CHAR(CODE(B2)+1),CHAR(65))

    and got same results. Note, I could have used "A" instead of char(65)

  3. #3
    Registered User
    Join Date
    05-01-2014
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Formula to insert shift daywise

    Thanks for the reply. Looks, I have not explained properly -

    The data has a date and the shift. For each date there can be three shifts i.e. 'A', 'B' and 'C'. I need to fill the shifts based on the dates. for example the data below -

    02-Sep-13 A
    03-Sep-13 A
    04-Sep-13 A
    05-Sep-13 A
    06-Sep-13 A
    06-Sep-13 B
    07-Sep-13 A
    07-Sep-13 B
    10-Sep-13 A
    11-Sep-13 A
    11-Sep-13 B
    12-Sep-13 A
    13-Sep-13 A
    14-Sep-13 A
    14-Sep-13 B
    14-Sep-13 C
    16-Sep-13 A
    02-Oct-13 A
    02-Oct-13 A

    Kindly let me have a formula for this.

    Regards,
    Murali

  4. #4
    Registered User
    Join Date
    06-25-2013
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: Formula to insert shift daywise

    Quote Originally Posted by akashmenon View Post
    Thanks for the reply. Looks, I have not explained properly -

    The data has a date and the shift. For each date there can be three shifts i.e. 'A', 'B' and 'C'. I need to fill the shifts based on the dates. for example the data below -

    02-Sep-13 A
    03-Sep-13 A
    04-Sep-13 A
    05-Sep-13 A
    06-Sep-13 A
    06-Sep-13 B
    07-Sep-13 A
    07-Sep-13 B
    10-Sep-13 A
    11-Sep-13 A
    11-Sep-13 B
    12-Sep-13 A
    13-Sep-13 A
    14-Sep-13 A
    14-Sep-13 B
    14-Sep-13 C
    16-Sep-13 A
    02-Oct-13 A
    02-Oct-13 A

    Kindly let me have a formula for this.

    Regards,
    Murali
    I apologize. I have no idea what you are trying to do. Is there some sort of before and after data? Is what you posted the before? If so, what is the data after?

+ 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. [SOLVED] Insert and shift cells UP
    By ozizushi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2013, 09:37 AM
  2. Need Help on Time Sheet Formula (Day Shift OK/Night Shift=Problem)
    By jomapac in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2013, 02:26 AM
  3. Help - Insert method of Range class failed - Selection.Insert Shift:=xlToRight
    By sandy@excelforum in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2012, 11:14 AM
  4. [SOLVED] Insert cell shift to right
    By ZuluNation in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-25-2012, 07:17 PM
  5. Insert, shift cells down and populate
    By ugg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-04-2007, 02:47 AM

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