Cell Reference as a variable?

placeholder

New Member
Joined
Dec 20, 2005
Messages
3
I've searched about quite a bit for the answer to this, however if there is a post about this here, then I am sorry and please link me over :)

I am working in Excel doing some Software Validation *yawn*. Having to prove each stage of someone elses software for auditing purposes.

What I want to know is;

Say I had 3 columns:

In A is a long list of numbers,
In B is the formula '=Count(A1:A5)'
and in C1 + C2 are variable numbers.

What I want to happen is this, the numbers in row C change the row number in the equation in B. So if C1 = 75 and C2=85 then B1= '=count(A75:85)', if C1=23 and C2=145 then B1= 'Count(A23:A145)'.

Please tell me this is possible :)

Thanks in advance
 

Some videos you may like

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
Hello, placeholder
Welcome to the Board !!!!!
take a look at the function INDIRECT

B1= Count(INDIRECT("A" & C1 & ":A" & C2))

kind regards,
Erik
 

scottishstu

New Member
Joined
Apr 21, 2005
Messages
17
Address

What about:

=COUNT(ADDRESS(C1,1):ADDRESS(C2,1))

Where C1 & C2 are your variables? and 1 is col no 1 i.e. "A"

See if this helps you any??

:biggrin:
 

Watch MrExcel Video

Forum statistics

Threads
1,118,231
Messages
5,571,028
Members
412,355
Latest member
BasicExelHelp
Top