End if without Block if followed by Block if without End if !

nmounir

Board Regular
Joined
Oct 16, 2020
Messages
107
Office Version
  1. 365
Platform
  1. Windows
Good day,

I am trying to write this code but i keep getting this error all the time.

any idea how to fix this?

Thank you
 

Attachments

  • end if without block if.PNG
    end if without block if.PNG
    21.7 KB · Views: 41
  • End if without block if 2.PNG
    End if without block if 2.PNG
    21.4 KB · Views: 42
I have a list of CDs that have maturity dates. when i select a certain date in the future, the table lists down the CD's that will be expired by then. This is done by an excel formula. that said, this list can expand or contrast according to the date selected (date is selected via a drop down list in cell L45). Once the list populates, the user should manually input (hard coding) the new interest rate in percentage (Column L) at which this CD will be renewed at. What i was trying to do here is that if a later date is selected and the interest rates were already manually input, then the user decides to select an earlier date, the list would shrink and so the interest rate that was manually input should then be removed automatically. Please see image 1 and 2 to fully understand what i am trying to do. you will notice in image 2 that the hard coded interest rate in % was removed because the code fired up after I added the End if after the Next CD as per Fluff recommendations.
The sheet is very slow after using this code. I am trying to write this code as an array to speed it up but I am not sure if i will be successful at writing it
correctly.
View attachment 64058

View attachment 64057
The code you posted only fires off of manual changes to column J, as you have it currently written.
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,044
Messages
6,122,827
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top