Hi, Ucpaul,
the solution jindon delivered was certainly based on the last sentence in post #4 (the readers of this post do not know what the dots stand for):
It means that if Label is not James or Gregore, then value in column C will be empty.
You still publish pictures - itīs true: a picture is worth a thousand words. But is your Excel able to make values from these pictures? Or show more than a static view from a word document? A workbook to have a look at both the data as well as the wanted outcome would have been helpful in the opening post as a lot of efforts would have been directed into the right direction from the start. For my part: sorry but I didnīt get the information from your posts until after I had answered while I should have known them before to adapt into my "efforts".
it just run the last command.
Thatīs what you told VBA to do as you referenced the very same range four times. Maybe alter the formula in the first cell to suit your needs and then have that formula being written to the immediate window after entering
and hitting enter. Please mind that any " inside the formula would need to be doubled up.
But I wonder why you would want VBA to insert this formula which could easily be dragged down by double-clicking on the lower right corner of the cell containing the correct formula.
Slow and clumpsy but the code I provided could be amended without problems.
Ciao,
Holger
Bookmarks