Hello,
I would like some help in creating a macro. My spreadsheet has four cells in which numbers can be entered: B6, B8, B10, or B12. Not all of the cells require a number. I have created an Excel formula with multiple IF statements. The formula picks up the numbers entered in the cells and puts them in another cell, B27. The number in B27 will either be from one of the aforementioned cells or a combination of two of the cells. I would like to create a macro for a button so that when the user clicks on the button the numbers either appear in B27 or, if the number is too long (i.e., exceeds 30 characters) a message box will appear telling the user that the numbers entered need to be changed. The Excel formula I would like to convert to VBA is below. It has the limit of 7 IF statements that Excel allows, but I would like the macro to include the 8 IF statements below. If am very, very green to VBA programming and do not know where to begin with this and would appreciate any help anyone can give. Thank you.
Bookmarks