I am not sure how your subject title relates to your actual request (your request deals with formulas, not VB code), but see if this answers your question...
It doesn't matter whether you drag down or to the right, the standard way to stop outputting visible results is to test the critical formula's cell for being empty and then output the empty string if it is. For example, let's say your formula in A2 was this...
="Value: "&A1
Obviously, as you drag it across, you will output just "Value: " when you run out of data in Row 1. If you modify the formula to this (testing the critical cell for being empty), you will only output something if there is a value in the corresponding Row 1 cell...
=IF(A1="","","Value: "&A1)
The general principle is this... see if a cell is blank and, if it is, output the empty string instead of the calculation.
Bookmarks