ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula Based on the cell its in (https://www.excelbanter.com/excel-worksheet-functions/194281-formula-based-cell-its.html)

JBoyer

Formula Based on the cell its in
 
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

JBoyer

Formula Based on the cell its in
 
In the previous most I meant to say I know this is NOT a correct function

"JBoyer" wrote:

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


pshepard

Formula Based on the cell its in
 
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" wrote:

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


JBoyer

Formula Based on the cell its in
 
Thanks that is exactly what I was looking for.

"pshepard" wrote:

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" wrote:

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



All times are GMT +1. The time now is 01:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com