+ Reply to Thread
Results 1 to 8 of 8

How to get ctrl+shift+enter formulas to update in a macro?

  1. #1
    Registered User
    Join Date
    04-01-2017
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    5

    How to get ctrl+shift+enter formulas to update in a macro?

    I am trying to rearrange data and have assembled an ugly macro that should;

    Set year to cell B10.
    UPDATE ALL FORMULAS AFTER THIS.
    Then collect data from a range on sheet1 and print it to the first empty row on sheet2.
    Set the next year and repeat.


    Everything works except the "ctrl+shift+enter" -formulas won't update. Actually the {} disappear when opening the macro.
    Is there an easy way to solve this without doing some hardcore coding? (just some command to update everything..?)

    Here is the code (ugly and hardcoded, I know..) and picture of the file. {} should be in the formula of M12.

    Also asked the same question at: https://www.mrexcel.com/forum/excel-...ate-macro.html
    Attached Images Attached Images
    Last edited by Call-of-Phoenix; 04-01-2017 at 11:48 AM.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to get ctrl+shift+enter formulas to update in a macro?

    Can't see any formula defined for cell M12 but if cell formula was "=SUM(A1:E1)" and that should be entered in M12 as an array a code like this should work

    Please Login or Register  to view this content.
    Alf

  3. #3
    Registered User
    Join Date
    04-01-2017
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    5

    Re: How to get ctrl+shift+enter formulas to update in a macro?

    Thanks Alf for the quick response!

    My idea is that I want to use the formula "{=IFERROR(INDEX(KaikkiFinat!$E$2:$U$71771;MATCH....)}" that's inputted already by hand in cell M12 (you see the formula in image2).

    Actually I have these CSE(ctrl+shift+enter) -formulas in many other cells as well. These CSE formulas are using value of cell (10,2) which is the year that the data is from. I just wanted an easy way to update all the formulas after the macro has changed the year and then print out the results to another sheet. Works just fine with the regular formulas, but for some reason the CSE won't update..

    If I understand you suggestion correctly you are right: I could try to work around the problem with your solution writing the cells again with the formulas been set again as FormulaArrays,
    but think it will take a lot of time with my skills..

    Anyways thank you for your answer.

  4. #4
    Registered User
    Join Date
    04-01-2017
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    5

    Re: How to get ctrl+shift+enter formulas to update in a macro?

    Sorry Ali for the Cross-posting. I am new to forums and didn't read the rules that carefully. I asked the moderator on the other side to remove the other thread.

  5. #5
    Registered User
    Join Date
    04-01-2017
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    5

    Re: How to get ctrl+shift+enter formulas to update in a macro?

    I am finding it difficult to modify my starting message on the mrexcel. I added the link to the end.
    Last edited by Call-of-Phoenix; 04-01-2017 at 11:59 AM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: How to get ctrl+shift+enter formulas to update in a macro?

    Thanks.

    In future, please post code directly in your post and put code tags (# on the toolbar) around them. Images cannot be copied easily!
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to get ctrl+shift+enter formulas to update in a macro?

    As an image is a bit difficult to copy a complex formula from I'll use the short and not complete version in post #3

    Please Login or Register  to view this content.
    Not really sure of the " and where to add this, you will have to play around a bit with this probably in order to get the proper format.

    Another alternative is to copy a cell that contains the array formula i.e. if G5 contained the array formula you needed you could copy this to M12 with this macro line

    Please Login or Register  to view this content.
    Alf

  8. #8
    Registered User
    Join Date
    04-01-2017
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    5

    Talking Re: How to get ctrl+shift+enter formulas to update in a macro?

    Thanks Alf for trying to help me!

    The easiest way to solve the problem for me was to just allow Excel to continue auto calculating by itself (using Vba macros stops excels autocalculating?).
    I did this by adding
    Please Login or Register  to view this content.
    to the beginning of the code.
    Last edited by Call-of-Phoenix; 04-03-2017 at 11:20 AM.

+ 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: 4
    Last Post: 04-27-2021, 11:49 AM
  2. Replies: 6
    Last Post: 08-11-2014, 09:13 PM
  3. With VBA Enter Ctrl Shift Enter For Array Formula
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-17-2013, 09:02 AM
  4. Ctrl+Shift+Enter (CSE) array formulas in VBA using differing formulas
    By officeguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2012, 04:31 PM
  5. Too many to update: Code for CTRL+SHIFT+ENTER
    By josterfeld in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-11-2008, 07:38 AM
  6. What does Ctrl+Shift+Enter do? How does it differ from Enter?
    By George Furnell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2006, 02:45 AM
  7. Replies: 2
    Last Post: 10-20-2005, 05:05 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