Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 22544

Code breaks when I replace a range with a variable

$
0
0

This code works fine:

   ActiveCell.Formula = "=""From :"" & TEXT(MIN(D16:D104),""mm/dd/yyyy"")"

I want to replace D104 with a variable(nrows)

    ActiveCell.Formula = "=""From : & TEXT(MIN(D16:"" & (nrows)) & "",""mm/dd/yyyy"")"

nrows is defined as a string. I'm sure it's a syntax error but I can't figure it out.thanks in advance for the help.


Viewing all articles
Browse latest Browse all 22544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>