PC Review


Reply
Thread Tools Rate Thread

Return Specific Value with IF Statement

 
 
aburnikel
Guest
Posts: n/a
 
      9th Jul 2004
I am attempting to pull data from another workbook. Here is my thoug
process on what I would like the function to do. I don't know if it i
possible or if I have to use VBA or another method.

if('cell from worksheet'<>"Inactive",return value of that cell,go t
next cell)

Basically, I have a list of names I would like to return, however, som
cell values are "INACTIVE", I would like to skip that cell and move t
the next cell that has an actual name. I know I can use the I
statement and return all the values, then sort and then delete thos
that are inactive - I plan on using a macro regardless, I just didn'
know if there was a "NEXT" function or "SKIP" function that might sav
me some time from bringing in unnecessary information.

any tips appreciated!!

Thanks,
Angi

--
Message posted from http://www.ExcelForum.com

 
Reply With Quote
 
 
 
 
Frank Kabel
Guest
Posts: n/a
 
      9th Jul 2004
Hi
one way using worksheet formulas: enter the following
array formula (entered with CTRL+SHIFT+ENTER):
=INDEX('sheet1'!$A$1:$A$1000,SMALL(IF('sheet1'!
$A$1:$A$1000<>"Inactive",ROW('sheet1'!$A$1:$A$1000)),ROW
(1:1)))

and copy this down as far as needed

>-----Original Message-----
>I am attempting to pull data from another workbook. Here

is my though
>process on what I would like the function to do. I don't

know if it is
>possible or if I have to use VBA or another method.
>
>if('cell from worksheet'<>"Inactive",return value of that

cell,go to
>next cell)
>
>Basically, I have a list of names I would like to return,

however, some
>cell values are "INACTIVE", I would like to skip that

cell and move to
>the next cell that has an actual name. I know I can use

the IF
>statement and return all the values, then sort and then

delete those
>that are inactive - I plan on using a macro regardless, I

just didn't
>know if there was a "NEXT" function or "SKIP" function

that might save
>me some time from bringing in unnecessary information.
>
>any tips appreciated!!
>
>Thanks,
>Angie
>
>
>---
>Message posted from http://www.ExcelForum.com/
>
>.
>

 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      10th Jul 2004
Safer:

=INDEX(Sheet1!$A$1:$A$1000,SMALL(IF(Sheet1!$A$1:$A$1000<>"Inactive",
ROW(INDIRECT("1:1000"))),ROW(1:1)))

That way, if a row is inserted above row 1 in Sheet1, the formula will
still return the correct value.


In article <2a61f01c465b7$d466bd60$(E-Mail Removed)>,
"Frank Kabel" <(E-Mail Removed)> wrote:

> one way using worksheet formulas: enter the following
> array formula (entered with CTRL+SHIFT+ENTER):
> =INDEX('sheet1'!$A$1:$A$1000,SMALL(IF('sheet1'!
> $A$1:$A$1000<>"Inactive",ROW('sheet1'!$A$1:$A$1000)),ROW
> (1:1)))

 
Reply With Quote
 
Peo Sjoblom
Guest
Posts: n/a
 
      10th Jul 2004
Or if you want to make it even safer <g>

=INDEX(Sheet1!$A$1:$A$1000,SMALL(IF(Sheet1!$A$1:$A$1000<>"Inactive",ROW(INDI
RECT("1:1000"))),ROW()-ROW($H$1)+1))

where H1 is the cell that holds the formula itself
that way it will work if a row is inserted above row 1 in the sheet that
holds the formula

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"JE McGimpsey" <(E-Mail Removed)> wrote in message
news:jemcgimpsey-(E-Mail Removed)...
> Safer:
>
> =INDEX(Sheet1!$A$1:$A$1000,SMALL(IF(Sheet1!$A$1:$A$1000<>"Inactive",
> ROW(INDIRECT("1:1000"))),ROW(1:1)))
>
> That way, if a row is inserted above row 1 in Sheet1, the formula will
> still return the correct value.
>
>
> In article <2a61f01c465b7$d466bd60$(E-Mail Removed)>,
> "Frank Kabel" <(E-Mail Removed)> wrote:
>
> > one way using worksheet formulas: enter the following
> > array formula (entered with CTRL+SHIFT+ENTER):
> > =INDEX('sheet1'!$A$1:$A$1000,SMALL(IF('sheet1'!
> > $A$1:$A$1000<>"Inactive",ROW('sheet1'!$A$1:$A$1000)),ROW
> > (1:1)))



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum cells to reach a specific value and return corresponding value belladelly Microsoft Excel Worksheet Functions 0 15th Dec 2009 02:02 AM
VBA IIf(myCell.Value = Array(myCell2(1).Value, myCell2(2).Value,myCell2(3).Value,myCell2(4).Value) ,"OK","No Match) EagleOne@discussions.microsoft.com Microsoft Excel Programming 2 24th Apr 2009 11:25 PM
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Microsoft Excel Misc 2 15th Mar 2007 02:02 AM
Write a formula that can look up and match a specific number and return the results for that specific number =?Utf-8?B?TWljaGVsbGU=?= Microsoft Excel Worksheet Functions 4 18th Mar 2004 05:48 PM
"not all code paths return a value" when throwing exception, can't return a value n_o_s_p_a__m Microsoft C# .NET 5 23rd Jul 2003 08:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:57 PM.