Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Perform a calculation based on a cell being selected

I have 6 columns with several rows of data. If I chose Column A by placing
an "x" in the last cell in the Column, I need a calculation to be peformed in
the 7th column (Cell immaterial) using the data in the Column. There will
only be one column selected at a time but it could be any of the 6 columns at
any time

Example

Column A
row 1 = 3
Row 2 = 5
row 3 = 2

if row 4 has an "x" in it I want a cell in Column 7 to do the following
calculation: 3(row 1)+5(row 2)-2(row 3)=6(calculated value)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Perform a calculation based on a cell being selected

One way:

=INDEX(A1:F1+A2:F2-A3:F3,1,MATCH("x",A4:F4))

In article ,
fluffy wrote:

I have 6 columns with several rows of data. If I chose Column A by placing
an "x" in the last cell in the Column, I need a calculation to be peformed in
the 7th column (Cell immaterial) using the data in the Column. There will
only be one column selected at a time but it could be any of the 6 columns at
any time

Example

Column A
row 1 = 3
Row 2 = 5
row 3 = 2

if row 4 has an "x" in it I want a cell in Column 7 to do the following
calculation: 3(row 1)+5(row 2)-2(row 3)=6(calculated value)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Perform a calculation based on a cell being selected

Try this:

=SUM(INDEX(A1:F2,,MATCH("x",A4:F4,0)))-INDEX(A3:F3,MATCH("x",A4:F4,0))

If there is no "x" the formula returns #N/A. If there is more than one "x"
the formula will calculate based on the leftmost "x".

--
Biff
Microsoft Excel MVP


"fluffy" wrote in message
...
I have 6 columns with several rows of data. If I chose Column A by placing
an "x" in the last cell in the Column, I need a calculation to be peformed
in
the 7th column (Cell immaterial) using the data in the Column. There will
only be one column selected at a time but it could be any of the 6 columns
at
any time

Example

Column A
row 1 = 3
Row 2 = 5
row 3 = 2

if row 4 has an "x" in it I want a cell in Column 7 to do the following
calculation: 3(row 1)+5(row 2)-2(row 3)=6(calculated value)



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I perform calculation within IF statement? Steven Masterson Excel Worksheet Functions 4 December 15th 08 08:13 AM
Perform a calculation on same cell across many worksheets Pat Adams Excel Worksheet Functions 1 July 7th 08 11:34 PM
How to perform matrix calculation in excel? Eric Excel Discussion (Misc queries) 1 May 28th 07 02:15 AM
perform a calculation when a certain phrase appears in a cell Eddie_of_Succasunna Excel Worksheet Functions 1 July 6th 06 09:11 AM
Perform oiperations relative to initial selected cell scratching my head Excel Discussion (Misc queries) 1 May 30th 05 05:42 PM


All times are GMT +1. The time now is 05:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"