Forum Discussion

BuddyGlenn's avatar
BuddyGlenn
Copper Contributor
Aug 27, 2020

insert value every nth row in a cell on that row

I know how to highlight every nth row in a sheet, I also need to place a name in a cell on the highlighted row.  For instance, I would like to place "Sally" in column R for every 100th row.  Please help with this.

Thanks

6 Replies

  • Hi BuddyGlenn,

     

    You can use the mod function and wrap it in If function, below example might be helpful where every 5th row I'm adding the name Sally

     

     

    =IF(MOD($A2,5)=0,"Sally","")

     

     

     

    Regards, Faraz Shaikh | MCT, MIE, MOS Master, Excel Expert

    If you find the above solution resolved your query don't forget mark as Official/Best Answer to help the other members find it more

     

    • BuddyGlenn's avatar
      BuddyGlenn
      Copper Contributor

      ExcelExciting Thank you for your help Faraz!  I am trying to add "Sally" to column S (19) for every 200th row in my spreadsheet.   I am able to highlight every row using conditional formatting with this formula:

       

      =MOD(ROW(),200)=0 

       

      and the above works highlighting the rows

       

      I was trying to incorporate adding "Sally" in column 19 for each row hightlighted.

       

      I know 

      =IF(MOD($A2,19)=0,"Sally","") will put in correct column, I need it to be every 200th column.  I cannot seem to get the correct syntax for this.

Resources