My example here is that I have a sequence of columns within a spreadsheet that data can be input into:
A B C D E F
Blank Blank 3 7 Blank 2
The data input into A, B C D E or F can vary, sometimes it may contain a value, sometimes it may not.
In Column G, I want to have a multiplication of all the values from A B C D E and F BUT only the cells that contain a number, and ignore the cells which do not contain a value (otherwise the answer is always 0 which is inaccurate). If all the columns had values higher than 0, the formula would be simply A x B x C x D x E x F but the formula needs to be able to adapt and change autonomously as sometimes the formula may end up being A X D x F or D x E x F.
I'm looking to utilise VBA for this - does anybody know how I can achieve this?
A B C D E F
Blank Blank 3 7 Blank 2
The data input into A, B C D E or F can vary, sometimes it may contain a value, sometimes it may not.
In Column G, I want to have a multiplication of all the values from A B C D E and F BUT only the cells that contain a number, and ignore the cells which do not contain a value (otherwise the answer is always 0 which is inaccurate). If all the columns had values higher than 0, the formula would be simply A x B x C x D x E x F but the formula needs to be able to adapt and change autonomously as sometimes the formula may end up being A X D x F or D x E x F.
I'm looking to utilise VBA for this - does anybody know how I can achieve this?