0

I need to have a cell that take the value of 2 cells and create a message text like:

From: 01/01/2000 To: 01/01/2020

I do in VBA the following code, but i don't understand where i fault with the double quotes quotes.

Worksheets("DATA").Range("D1").Formula = "=CONCAT(""From: "";TEXT(SUBTOTAL(5;D8:D18);""DD/MM/YYYY"");""To: "";TEXT(SUBTOTAL(4;D8:D18);""DD/MM/YYYY""))"

Can you help me?

Thanks a lot.

L

chuck22
  • 45
  • 1
  • 7
  • 1
    Note that you have to use `,` instead of `;` - see [this question](https://stackoverflow.com/questions/35724156/different-languages-issue-when-inserting-formula-from-vba). – BigBen May 12 '20 at 12:49
  • you are right, it's not a problem of double quotes but commas. – chuck22 May 12 '20 at 12:52

0 Answers0