+ Reply to Thread
Results 1 to 16 of 16

Need to Insert Text in Range

  1. #1
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Need to Insert Text in Range

    See attached
    I have a Range with 2 columns and N rows (say from 1 to 100)
    But at the end of 100 is row 1, so it is an unfolded circle
    I need to insert Wi until all cells are filled.
    I have explained in attached
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    One more Note :
    There are Columns, like 1 to 2, or 1 to 3, or 4 to 5 .....MAX 12
    For Formula, they really DO NOT MATTER.
    It matter ONLY in Final, when I will Concatenate, or ...Textjoin ...all corresponded columns.
    Like I will have 20 charts, for 20 Wi, I look in all 20 for Column 1, and join in main chart

    Also it can be like this, per column
    - Write Wi in first column (in row, number,gap)
    - Shift Wi in second column at Pitch
    - Take all and Index (number, pitch)
    Last edited by ionelz; 02-15-2019 at 09:05 AM.

  3. #3
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    I have simplified my request, see attached.
    Only ONE W1 to insert, only 2 columns.
    To be more simple :
    In Column 1 , add W1 - at Cluster Number times at Gap (0,1,2....).
    Then in Column 1 copy ALL above at Index Number times at Index Pitch
    In Column 2, just copy Column 1,at Index Pitch
    Column 2 is identical with column 1 but "shifted down" with Index Pitch
    Attached Files Attached Files
    Last edited by ionelz; 02-15-2019 at 11:11 PM.

  4. #4
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    One more simplification, maybe some one will come with an ideea !
    The request now is : Plug 3 "W1" in one Column F2:F25 then Copy them in Another Column
    Attached Files Attached Files

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Need to Insert Text in Range

    This is from Post#3
    But I don't get how you count index for column 2

    O4 or V4

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    Yes, you right, but I was was trying to make as simple as possible (so I took second column off), hopping for other ideas for one column.
    So could you please think the Formula this way too :
    1. Formula just for First Column (regardless of c4 or d4 value) : add W1, at E4, G4 times, at H4 gap, with I4, then index it J4 times at K4 Pitch with L4
    2. Formula in Second Column : just Copy Column 1, down, F4 Pitch
    So second column of W1 (if d4<>0 and f4<>0) , it is identical with first but down F4 (and First column take care for all)
    Then I will concatenate all per corresponded C4 and D4
    if D4 = 0 (w1 stay in one column) then nothing in second column
    Last edited by ionelz; 02-18-2019 at 10:01 AM.

  7. #7
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    please see attached, there is no need for Right copy formula
    Attached Files Attached Files
    Last edited by ionelz; 02-18-2019 at 10:56 AM.

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Need to Insert Text in Range

    Please try

    R4
    =REPT($B$4,SUMPRODUCT(($N4=MOD(ROW(INDIRECT("1:"&$G$4))*(1+$H$4)-$H$4+$E$4-2,$N$3)+1)*($C$4=R$3)*($I$4="y")))

    T4
    =REPT($B$4,SUMPRODUCT(($N4=MOD(ROW(INDIRECT("1:"&$G$4))*(1+$H$4)-$H$4+COLUMN(INDIRECT("C1:C"&$J$4-1,))*$K$4+$E$4-2,$N$3)+1)*($C$4=T$3)*($L$4="y")))
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    Thank you
    1. I would like to ask you if example $C$4=R$3 is necessary ? in R4. Can ($C$4=R$3) be 1 ?
    2. From where "-2" is coming ?
    Your formula work super great ....
    Thank you a lot for time spent on this

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Need to Insert Text in Range

    $C$4=R$3 for check if From Column (C4) match column header (R3)

    =mod(24,24)=0 but we need 24

    =Mod(24-1,24)+1
    =24

    that is -1


    Then we need to add From row (E4) that make another -1

    =Mod(24-1+E4-1,24)+1
    =Mod(24+E4-2,24)+1

  11. #11
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    Yes, the reason i was asking you is this :
    On first Index, one -1 is from MOD and another -1 is from E4, so -2
    On second Index, there is E4+F4 ...but still -2
    This drive me crazy !!! because I assigned say cell A1=-2 ( I have it 14 times X Formula so there are 28 of -2) and for some I have A1=-2 and other A1=-3

    Now look like -2 work , but I do not get it why ! Who cancel + F4 ?

    I have checked both MOD in formula and they work great, as it should ....
    Last edited by ionelz; 02-18-2019 at 08:02 PM.

  12. #12
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Need to Insert Text in Range

    F4 is just for shift, no need another -1.

  13. #13
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    Is anyway you could add back I4 ? on this formula

  14. #14
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Need to Insert Text in Range

    Which formula?

  15. #15
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Need to Insert Text in Range

    The last one , at #8

  16. #16
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Need to Insert Text in Range

    From R4 check I4, Index T4 check L4 as it should.

+ 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] VBA to insert text based on cell in range
    By Burt_100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-11-2016, 10:50 AM
  2. [SOLVED] Need macro to check if text in one range exists in another, if yes, insert message box...
    By rcicconetti in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-13-2016, 06:45 AM
  3. [SOLVED] Look for specific text string, insert row below, insert text to that row
    By jwats in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-19-2015, 03:08 PM
  4. [SOLVED] Insert New row to add more rows to merge range with wrap text
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2014, 01:27 PM
  5. Formula to identify part of a text in cell from range of cells & insert adjacent cell text
    By Novicebutnotforlong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-19-2013, 02:11 AM
  6. [SOLVED] Insert text after every 8 row in a range
    By steve87bg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-16-2013, 11:39 AM
  7. Replies: 3
    Last Post: 06-22-2010, 07:17 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