Picking up part of a formula from another cell

D

david

Can someone help please - I know Excel can do this because I have done
it before but have forgotten how (I blame my age!!)

I want to have a formula in a cell that picks up the letter part of
the cell reference from another cell.

ie I want to do a countif a cell range equals 1 where the column
letter of the start of the cell range and the end of the cell range
come from two separate cells.

This is so I can modify just those two cells and automatically update
all the formulae in the worksheet.

I am working with both Excel 2000 & 2003


Thanks

David
 
P

Pete_UK

Have a look at the INDIRECT function in Excel Help - this will allow
you to do what you are trying to do.

Hope this helps.

Pete
 
B

Bob Phillips

=COUNTIF(INDIRECT(M1&":"&N1),1)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

david

Sorry - I am being particulary thick!!

In the formula below I want the start letter of the range to come from
A9 and the end letter from b9.

The count will run between the intervening columns for row 13 only.

Could I please be a pain and ask for the full format.

Thanks

David
 
D

David Biddulph

The INDIRECT function takes a text string as its input, so you need to
generate the appropriate text string for your range.

If you are trying to produce the formula =COUNTIF(D13:Z13,1) by putting the
D in A9, and the Z in B9, try the formula:
=COUNTIF(INDIRECT(A9&"13:"&B9&"13"),1)
 
D

david

Thanks to all

David

The INDIRECT function takes a text string as its input, so you need to
generate the appropriate text string for your range.

If you are trying to produce the formula =COUNTIF(D13:Z13,1) by putting the
D in A9, and the Z in B9, try the formula:
=COUNTIF(INDIRECT(A9&"13:"&B9&"13"),1)
--
David Biddulph









- Show quoted text -
 

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