how to code this

  • Thread starter Thread starter Fan924
  • Start date Start date
F

Fan924

I have line number 130 stored in cell A1. In A2, I want it to load the
contents of C130. If I change A1 to say 140, the contents of C140
should appear in A2. Not sure how to code this. TIA
 
I have line number 130 stored in cell A1. In A2, I want it to load the
contents of C130. If I change A1 to say 140, the contents of C140
should appear in A2. Not sure how to code this. TIA

Try this formula in cell A2:

=OFFSET(C1,A1-1,0)

Hope this helps / Lars-Åke
 
I have line number 130 stored in cell A1. In A2, I want it to load the
contents of C130. If I change A1 to say 140, the contents of C140
should appear in A2. Not sure how to code this. TIA


Here is another one you can try in cell A2:

=INDIRECT("C"&A1)

Hope this helps / Lars-Åke
 
Thanks Lars,

Similar to what I have used in macros. I just drew a blank. I was able
to change it to pull data from another sheet.

=INDIRECT("SHEET1!C" & A1)
 

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