Single Range for Multiple Operations

P

Prakash

Hi Experts,

1. I let the user select a row as range using
(Set EndCell = Application.InputBox("Select the range/cells",Type:=8)

2. Suppose user selects Row#3 in the foll example:
ColA ColB ColB ColD ColE
Row1 5 7 8 6 8
Row2 7 5 7 4 0
Row3 5 6 7 9 10
Row4 4 4 4 3 2

I want to use value 5 under ColA for calculation 1
I want to use value 6 under ColA for calculation 2
I want to use value 7 under ColA for calculation 3
I want to use value 9 under ColA for calculation 4
I want to use value 10 under ColA for calculation 5

How do I use the values of one row and different columns for different
calculations? Without prompting the user to select value of Row3 and columnA
for calculation 1 and so on...

Thanks in advance for your great help
 
T

Toppers

Set rg=Application.InputBox("Select the range/cells",Type:=8)
r=rg.row

For c=1 to 5 '<== columns A to F

mycalc=rg(c)* ....

OR

mycalc=cells(r,c)*....

next c
 

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