+ Reply to Thread
Results 1 to 9 of 9

Copy array to new field and update to current column

Hybrid View

  1. #1
    Registered User
    Join Date
    12-17-2019
    Location
    San Diego, CA
    MS-Off Ver
    o365
    Posts
    5

    Copy array to new field and update to current column

    I have an array formula, i think that's what it's called - that finds the most frequent word in a column and returns it while simultaneously ignoring the blank cells and it works totally fine. My problem is when i try to copy it to the next column, the formula stays static, meaning if it's a formula for column C, but now i paste the formula in column D - then hit ctrl+shift+enter it still says column C, so I have to manually type in all of the references to column C and change them to column D to make the formula work in that column. I did it for 5 columns manually and I'm spent. Is there a way I can make this auto populate the new column? Here is my formula:

    =INDEX($C$4:$C$33,MATCH(INDEX(MAX(COUNTIFS($C$4:$C$33,$C$4:$C$33,$C$4:$C$33,"<>0"),),),INDEX(COUNTIFS($C$4:$C$33,$C$4:$C$33,$C$4:$C$33,"<>0"),),0))

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,468

    Re: Copy array to new field and update to current column

    You can remove the $ symbols in front of every C, then when it is copied across those references to column C will automatically change to D, E etc.

    You can use Find & Replace (CTRL-H) to change $C to C in one operation.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-17-2019
    Location
    San Diego, CA
    MS-Off Ver
    o365
    Posts
    5

    Re: Copy array to new field and update to current column

    This worked perfectly!!! Thanks Pete, you're a lifesaver!

  4. #4
    Registered User
    Join Date
    12-17-2019
    Location
    San Diego, CA
    MS-Off Ver
    o365
    Posts
    5

    Re: Copy array to new field and update to current column

    Could you help me with one more thing? What if I wanted to do multiple columns and get the most frequent? For example, I've been doing it with one column, in this example, column C . But what if I wanted to check column C, D, E and look for the most frequent word from those columns combined? How would the formula look then?

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,468

    Re: Copy array to new field and update to current column

    It's difficult to advise without seeing your file - it would help if you attached a sample Excel workbook. Take a look at the yellow banner at the top of the screen, for details of how to do this.

    Given that you have a formula which works on a single column, I'd be tempted to combine the data from those 3 columns into one (maybe on a different sheet), then you already have a way of achieving your outcome.

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    12-17-2019
    Location
    San Diego, CA
    MS-Off Ver
    o365
    Posts
    5

    Re: Copy array to new field and update to current column

    k attaching now
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-17-2019
    Location
    San Diego, CA
    MS-Off Ver
    o365
    Posts
    5

    Re: Copy array to new field and update to current column

    Did that attachment work ?
    Last edited by AliGW; 12-18-2019 at 01:33 PM. Reason: Please don't quote unnecessarily!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,468

    Re: Copy array to new field and update to current column

    Yes, it did work, but I don't have chance to look at it right now, as I will be going out soon (it's near Christmas, so lots of visits/visitors and get-togethers etc.)

    Pete

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,919

    Re: Copy array to new field and update to current column

    Yes. Please be patient.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. Replies: 10
    Last Post: 05-31-2019, 04:35 AM
  2. Replies: 7
    Last Post: 05-31-2019, 03:57 AM
  3. Copy formulas from one column to next column based on Current & Prior Month
    By balston2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2018, 08:59 PM
  4. [SOLVED] Using Auto Filter with Array Criteria to Update from another Column using VBA
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2018, 04:30 AM
  5. Check current month column and update it accordingly
    By Thinker8 in forum Excel General
    Replies: 4
    Last Post: 04-21-2014, 06:43 AM
  6. [SOLVED] Copy and paste column to current week column
    By RobUK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-15-2013, 05:25 AM
  7. Copy current column?
    By Adamcadaver in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2010, 05:00 AM

Tags for this Thread

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