how to paste 2 variables value in a cell

  • Thread starter Thread starter cliee
  • Start date Start date
C

cliee

Hi I am a beginner of excel programmer
I do not know many things on excel commands

I want to copy 2 variables,
eg. art and des
and then paste their value in a cell
eg. art & des

art = ActiveCell(1, 1).Value
des = ActiveCell(1, 3).Value

If ActiveSheet.Range("A6").Value = 0 Then

Worksheets("Label-s").Range("A7").Value.select
"the price is" & art & des.Paste
End If

I don't know who to do this

Many thanks for your help
 
I want to make a condition ( if the cell is empty) to do something......

If ActiveSheet.Range("A6").Value = 0 Then .......

value = 0 do not mean the cell is empty

do you know how ?

thanks
 
this may be a solution if you want to avoid vba

if your target cell is C7, type in C8
=IF(C7="",0)
then copy C8 to C7
if C7 has somevalue the C8 will give "false"

is this what you want?
 
art = ActiveCell(1, 1).Value
des = ActiveCell(1, 3).Value

If ActiveSheet.Range("A6").Value = "" Then

Worksheets("Label-s").Range("A7").Value = _
"the price is" & art & des
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top