ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF Function returning range (https://www.excelbanter.com/excel-discussion-misc-queries/202600-if-function-returning-range.html)

Brian

IF Function returning range
 
I'm trying to create an IF Function that returns info from a range of cells.
This is what I have so far:

=IF(C4="HUD",HUD!A1:C100,FALSE)

If a certain cell (C4) is HUD then I want cells A6 through C106 to fill in
with info from the HUD worksheet cells A1 through C100. Not sure what I am
doing wrong. Is the IF Function even the best function to use for this?

Gary''s Student

IF Function returning range
 
You have the right idea, in general. In A6, enter:

=IF($C$4="HUD",HUD!A1,"")

and then copy down/across

--
Gary''s Student - gsnu200805


"Brian" wrote:

I'm trying to create an IF Function that returns info from a range of cells.
This is what I have so far:

=IF(C4="HUD",HUD!A1:C100,FALSE)

If a certain cell (C4) is HUD then I want cells A6 through C106 to fill in
with info from the HUD worksheet cells A1 through C100. Not sure what I am
doing wrong. Is the IF Function even the best function to use for this?


T. Valko

IF Function returning range
 
cells A6 through C106
cells A1 through C100


A6:C106 = 101 rows
A1:C100 = 100 rows

Select the range A6:C105 so that A6 is the active cell.

The active cell is the one in the selected range that is not "blueish".

Type this array formula:

=IF(C4="hud",HUD!A1:C100,"")

Now, instead of hitting the ENTER key hold down both the CTRL key and the
SHIFT key then hit ENTER.


--
Biff
Microsoft Excel MVP


"Brian" wrote in message
...
I'm trying to create an IF Function that returns info from a range of
cells.
This is what I have so far:

=IF(C4="HUD",HUD!A1:C100,FALSE)

If a certain cell (C4) is HUD then I want cells A6 through C106 to fill in
with info from the HUD worksheet cells A1 through C100. Not sure what I
am
doing wrong. Is the IF Function even the best function to use for this?




Brian

IF Function returning range
 
Thank you very much. Now I have a couple more questions. I copied down and
across as instructed and now wherever there is nothing in the cell it puts a
0. Also, if I want the "HUD" to be interchangeable, what do I do? For
example, HUD may be Tax Credit or something else. I have 15 posibilited of
what it could be and what I am wanting is, depending on which one of the 15
it is in C4, then it returns a different range of cells from a different
worksheet? Am I asking too much? Sorry, I'm not too familiar with this.

Thank you.

"Gary''s Student" wrote:

You have the right idea, in general. In A6, enter:

=IF($C$4="HUD",HUD!A1,"")

and then copy down/across

--
Gary''s Student - gsnu200805


"Brian" wrote:

I'm trying to create an IF Function that returns info from a range of cells.
This is what I have so far:

=IF(C4="HUD",HUD!A1:C100,FALSE)

If a certain cell (C4) is HUD then I want cells A6 through C106 to fill in
with info from the HUD worksheet cells A1 through C100. Not sure what I am
doing wrong. Is the IF Function even the best function to use for this?


Brian

IF Function returning range
 
Thank you very much. Now I have a couple more questions. I copied down and
across as instructed and now wherever there is nothing in the cell it puts a
0. Also, if I want the "HUD" to be interchangeable, what do I do? For
example, HUD may be Tax Credit or something else. I have 15 posibilited of
what it could be and what I am wanting is, depending on which one of the 15
it is in C4, then it returns a different range of cells from a different
worksheet? Am I asking too much? Sorry, I'm not too familiar with this.

Thank you.


"T. Valko" wrote:

cells A6 through C106
cells A1 through C100


A6:C106 = 101 rows
A1:C100 = 100 rows

Select the range A6:C105 so that A6 is the active cell.

The active cell is the one in the selected range that is not "blueish".

Type this array formula:

=IF(C4="hud",HUD!A1:C100,"")

Now, instead of hitting the ENTER key hold down both the CTRL key and the
SHIFT key then hit ENTER.


--
Biff
Microsoft Excel MVP


"Brian" wrote in message
...
I'm trying to create an IF Function that returns info from a range of
cells.
This is what I have so far:

=IF(C4="HUD",HUD!A1:C100,FALSE)

If a certain cell (C4) is HUD then I want cells A6 through C106 to fill in
with info from the HUD worksheet cells A1 through C100. Not sure what I
am
doing wrong. Is the IF Function even the best function to use for this?





T. Valko

IF Function returning range
 
I copied down and across as instructed

Ok, that means you used Gary's suggestion.

wherever there is nothing in the cell it puts a 0.


And you probably want a blank cell, not a 0?

I have 15 posibilited [sic]


Are each of these on its own sheet of the same name and the range is
*exactly* the same for all 15?

--
Biff
Microsoft Excel MVP


"Brian" wrote in message
...
Thank you very much. Now I have a couple more questions. I copied down and
across as instructed and now wherever there is nothing in the cell it puts
a
0. Also, if I want the "HUD" to be interchangeable, what do I do? For
example, HUD may be Tax Credit or something else. I have 15 posibilited of
what it could be and what I am wanting is, depending on which one of the
15
it is in C4, then it returns a different range of cells from a different
worksheet? Am I asking too much? Sorry, I'm not too familiar with this.

Thank you.


"T. Valko" wrote:

cells A6 through C106
cells A1 through C100


A6:C106 = 101 rows
A1:C100 = 100 rows

Select the range A6:C105 so that A6 is the active cell.

The active cell is the one in the selected range that is not "blueish".

Type this array formula:

=IF(C4="hud",HUD!A1:C100,"")

Now, instead of hitting the ENTER key hold down both the CTRL key and the
SHIFT key then hit ENTER.


--
Biff
Microsoft Excel MVP


"Brian" wrote in message
...
I'm trying to create an IF Function that returns info from a range of
cells.
This is what I have so far:

=IF(C4="HUD",HUD!A1:C100,FALSE)

If a certain cell (C4) is HUD then I want cells A6 through C106 to fill
in
with info from the HUD worksheet cells A1 through C100. Not sure what
I
am
doing wrong. Is the IF Function even the best function to use for
this?








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

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