cell contents in a text/message box

J

JanT

I would like to add the contents of a number of cells from a list into a
text/message box. The exact location of the cells in the list varies. For
example: if A1=10, then content in cells b10 and c10 should be displayed and
if A1=3 then content in cells b3 and c3 to be displayed, etc...
 
J

Jacob Skaria

Try the below code

Sub Macro()

Dim intTemp As Integer
intTemp = Range("A1")
If IsNumeric(intTemp) Then _
MsgBox Range("B" & intTemp) & " " & Range("C" & intTemp)

End Sub

If this post helps click Yes
 

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

Top