#1
|
|||
|
|||
Formula update using VBA
Hi Excel 2003
I have a formula that includes a range eg $AA$2:$AA$200. If I insert a cell within that range my formula gets updated to $AA$2:$AA$201. If I try the same by VBA the formula does not get updated. Anybody help me out here? John |
#2
|
||||
|
||||
I can't reproduce the problem here.
What's the code you use to insert a cell? A workbook with the problem would be better still. |
#3
|
|||
|
|||
thanks for the reply - sorry for the delay in getting back.
Have attached sample sheet (one empty line above the red border. Starting in col A curser does exactly as required - jumping back to col A after stopping on each field that requires data entry (col I and M can remain empty). All I am wanting to do is to insert cells A to M above the red line (and below the line just entered) that contains the correct formulas in the line ready for the next entry and updates the formulas using the extended column lengths. I know it is simple but I just can't get the code right - DOH! Regards John |
#4
|
||||
|
||||
A number of points:
1. Did you know you can change the direction of travel the cursor/selected cell goes in after you press Enter from down one cell to right one cell? 2. You can lock cells, then protect the sheet and choose the option of the user not being able to select locked cells, then when the user enters a value and presses Enter, the selection jumps to the next unlocked cell in the direction opted for in point 1 above. 3. If you convert your table into a proper Excel Table (I think it's a List in older versions of Excel), when you add rows at the bottom of the table, the table expands and formulae outside the table adjust to accommodate the whole table. So you may need very little code indeed. But, and it's a big but, I'm not sure if Excel 97-2003 version works in the same way (the version of Excel the file you attached seems to have been made by). So before I offer a solution, can you confirm which version of Excel you are using? If it's an older version I'm going to have to use a computer I don't use any more which has this old version on it to confirm what I've said above and work out another solution(s) for you. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to update lastname with the help of V-Lookup formula? | Mangesh1212 | Excel | 6 | 12-05-2018 02:15 AM |
Macro to constantly update Field Formula | Eduardo Care | Excel | 1 | 08-31-2015 01:25 PM |
Auto update in formula/Obtain the name of the cell | Eduardo Care | Word | 2 | 08-26-2015 04:45 PM |
I want to use formula to auto update cells with information | Steve81uk | Excel | 15 | 01-09-2015 12:58 PM |
Macro not Performing Formula Update as Expected | tandchas | Excel Programming | 7 | 06-27-2014 05:42 AM |