Formula Based on the cell its in

J

JBoyer

If I have a formula in a cell can base its content off that cell. What I mean
is say in E2 i have the following equation =IF(SUM(F6:L6)>0,SUM(F6:L6),""). I
want to fomat it so it would be something like0=IF(SUM((F[CELL
LOCATION+4]:L[CELL LOCATION+4])>0,SUM(F[CELL LOCATION+4]:L[CELL
LOCATION+4]),""). I know this is a correction function, but I just want to
explain what I mean
 
P

pshepard

Hi JBoyer,

The Row() function returns the row number the formula is in; the Indirect
function allows you to calculate an address.

=IF(SUM(INDIRECT("F"&ROW()+4&":L"&ROW()+4))>0,SUM(INDIRECT("F"&ROW()+4&":L"&ROW()+4)),"")

Hope this helps.
Peggy
 
J

JBoyer

Thanks that is exactly what I was looking for.

pshepard said:
Hi JBoyer,

The Row() function returns the row number the formula is in; the Indirect
function allows you to calculate an address.

=IF(SUM(INDIRECT("F"&ROW()+4&":L"&ROW()+4))>0,SUM(INDIRECT("F"&ROW()+4&":L"&ROW()+4)),"")

Hope this helps.
Peggy

JBoyer said:
If I have a formula in a cell can base its content off that cell. What I mean
is say in E2 i have the following equation =IF(SUM(F6:L6)>0,SUM(F6:L6),""). I
want to fomat it so it would be something like0=IF(SUM((F[CELL
LOCATION+4]:L[CELL LOCATION+4])>0,SUM(F[CELL LOCATION+4]:L[CELL
LOCATION+4]),""). I know this is a correction function, but I just want to
explain what I mean
 

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