+ Reply to Thread
Results 1 to 11 of 11

editing a formula to insert a certain piece of text every 7th row

  1. #1
    Registered User
    Join Date
    04-18-2012
    Location
    birmingham england
    MS-Off Ver
    2010
    Posts
    63

    editing a formula to insert a certain piece of text every 7th row

    Hi,
    I am creating a spreadsheet that requires a column which contains consecutive dates, the seventh day is omitted as i dont need it, using these forums i created (copied and pasted) a formula to leave the seventh day row blank each time.
    so it would read

    1/1/1
    2/1/1
    3/1/1
    4/1/1
    5/1/1
    6/1/1

    8/1/1
    9/1/1
    10/1/1
    Etc etc etc

    I achieved that by using this forumla =IF(B5="",B4+2,IF(WEEKDAY(B5)=7,"",B5+1))

    Now, i would like to edit this formula so that instead of a blank row, it reads 'closing value'

    any ideas if it can be done? and if it can be done where in the formula do i insert it, also is it possible to have it in a particular font/color/size?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: editing a formula to insert a certain piece of text every 7th row

    change the 2nd "" to "closing value"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-18-2012
    Location
    birmingham england
    MS-Off Ver
    2010
    Posts
    63

    Re: editing a formula to insert a certain piece of text every 7th row

    Thanks for your quick reply.
    I have done this and then dragged down to autofill the following fields, it worked untill the first 'closing value' field' then after that it shows #value! instead of the next date and continues only show #value! and no dates after that.
    any thoughts?

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: editing a formula to insert a certain piece of text every 7th row

    You have to change the first "" to "closing value" as well

  5. #5
    Registered User
    Join Date
    04-18-2012
    Location
    birmingham england
    MS-Off Ver
    2010
    Posts
    63

    Re: editing a formula to insert a certain piece of text every 7th row

    Worked a treat...

    Thanks to you both!!!

  6. #6
    Registered User
    Join Date
    04-18-2012
    Location
    birmingham england
    MS-Off Ver
    2010
    Posts
    63

    Re: editing a formula to insert a certain piece of text every 7th row

    Is there any way to format this text as part of the formula at all?

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: editing a formula to insert a certain piece of text every 7th row

    I don't know what you mean by that.

  8. #8
    Registered User
    Join Date
    04-18-2012
    Location
    birmingham england
    MS-Off Ver
    2010
    Posts
    63

    Re: editing a formula to insert a certain piece of text every 7th row

    I'd like the text 'closing value' to come up in red and in a slightly bigger font is possible?
    i tried formatting it after applying the formula and then dragging down from the corner of the cell and it changed the colour of the text in every cell after that. I would like just 'closing value' the be a different colour each time?

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: editing a formula to insert a certain piece of text every 7th row

    Apply Conditional Formatting to the range
    Select the entire range and open the CF window - choose the formula option - use this formula =ISTEXT(B4) (change the B4 to first cell of the range if it isn't B4)
    Select the format you want - you can select a different font style and colour but not size - and/or change the background colour

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: editing a formula to insert a certain piece of text every 7th row

    If you really want Larger Font then you can forget CF and redo that column completely.
    Put your start date in the first cell (I'll assume B2) and in the next cell put = B2+1 drag this down to B7
    In B8 type "Closing value" and format that cell any way you want
    Now, in B9 put =B2+7 and drag it down to B14
    Copy B8 and paste it B15
    Now select the range B9:B15 and drag that range down as far as you want

  11. #11
    Registered User
    Join Date
    04-18-2012
    Location
    birmingham england
    MS-Off Ver
    2010
    Posts
    63

    Re: editing a formula to insert a certain piece of text every 7th row

    Cheers, that seems to have done the trick, thanks for your help!!

+ 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