Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default get a cell reference as a result of an If Function

Hello,
This is more complicated than it sounds. I need to do an If function to get a
cell reference as a result... Let me give you my situation....

I have an if function that should go like this...

Pretend I am typing this function into cell B1:

"If cell C1 is less than or equal to zero, then reference cell A1, if not
then add 1 to that to reference cell A2 instead."

That way cell B1 will either be referencing cell A1 or A2. But I need this to
be
in such a way that I can copy this function down hundreds of cells in the B
column so that it will always continue to reference down the line to A3 then
A4,
then A5... etc.... but it will only change when the cell in C column is
positive.

Can anyone help? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default get a cell reference as a result of an If Function

On Mar 21, 8:24*am, coolistic wrote:
Hello,
*This is more complicated than it sounds. I need to do an If function to get a
*cell reference as a result... Let me give you my situation....

*I have an if function that should go like this...

*Pretend I am typing this function into cell B1:

*"If cell C1 is less than or equal to zero, then reference cell A1, if not
*then add 1 to that to reference cell A2 instead."

*That way cell B1 will either be referencing cell A1 or A2. But I need this to
be
*in such a way that I can copy this function down hundreds of cells in the B
*column so that it will always continue to reference down the line to A3 then
A4,
*then A5... etc.... but it will only change when the cell in C column is
*positive.


If you mean that B1 will reference A1 or A2 depending on sign of C1
then B1 is

=IF(C10, A2, A1)

and drag the copy square down and B4 will be

=IF(C40,A5,A4)

OTOH if you mean that B4 should be =IF(C10,A5,A4) then having put the
same formula into B1, then click on the formula to position the cursor
between the C & 1, and press F4 once. The formula will then show B1 is

=IF($C$10, A2, A1)

Which means that the C & the 1 will not change as you copy-drag the
square down.

Pressing F4 repeatedly will change the formula to C$1, $C1, $C$1 and
then C1. In each case the dollar sign indicates that that part of the
formula will not change as you copy it.

But if you want something else then explain less ambiguously <g.

Alan Lloyd

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
large function result as reference for offset function Z Excel Discussion (Misc queries) 1 May 5th 09 12:55 AM
How to use result from some function as a part of cell reference? Piia Excel Discussion (Misc queries) 2 March 4th 09 03:45 PM
Advanced formula - Return result & Show Cell Reference of result Irv Excel Worksheet Functions 7 May 6th 06 03:36 AM
How to replace a function with its result or resulting reference in a formula? Dmitry Kopnichev Excel Worksheet Functions 5 October 13th 05 12:15 PM
Using result from ADDRESS function as a cell reference itself LShutzberg Excel Worksheet Functions 3 December 12th 04 12:18 PM


All times are GMT +1. The time now is 07:34 PM.

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

About Us

"It's about Microsoft Excel"