Hi (T_T),
you cannot compare the values of cells in a range in one go (except using Evaluate) but should loop through the cells instead. And I doubt the next error would occur as rows 4 and 5 are text.
Later on in the code you refer to a with statement which is not provided as well as no information about what ranges "peak shaving" and "battery" refer to and what pkSh is.
Maybe you should give this code a try:
Please be informed that the last For...Next loop clears the contents of the userform if you want further entries to be made (or simply use Unload.Me for just one entry).
Ciao,
Holger
Bookmarks