Concatenating a variable.formula and variable.value

Closed
AdiK - Nov 23, 2016 at 06:05 AM
yg_be Posts 22724 Registration date Sunday June 8, 2008 Status Contributor Last seen April 25, 2024 - Nov 24, 2016 at 04:03 PM
Hello Guys,

I would like to know if there is a way to concatenate a variable.formula and variable.value.
I have written the following lines of code:

sub xyz()

dim x as string
dim y as string

x=Range("A1").Formula
y = Range("A2").Value

Range("A3").Value = x & y

End Sub

Range A1 contains a formula and its value can change according to some other cells. When I am printing the value in A3, its showing the value of "x" as just the formula instead of it curent value when concatenated with the value in A2.

Kindly help me. Thanks in Advance :)

1 response

yg_be Posts 22724 Registration date Sunday June 8, 2008 Status Contributor Last seen April 25, 2024 5
Nov 24, 2016 at 04:03 PM
Please describe :
- the content of A1 and of A2
- what you obtain in A3
- what you expect in A3
0