If - Index

Qrackerman

New Member
Joined
Nov 7, 2002
Messages
6
I am using "index" to populate cells in my spreadsheet. I would like to know if I can use an "if" statement to display a nothing instead of zero if no data is in the cell I am indexing?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

inspin

New Member
Joined
Oct 29, 2002
Messages
24
could do something like this:

=IF(A1=0,"") ?

"a1" being the cell you index

if this is to simple, post back

-Ins
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
On 2002-11-08 08:14, Qrackerman wrote:
I am using "index" to populate cells in my spreadsheet. I would like to know if I can use an "if" statement to display a nothing instead of zero if no data is in the cell I am indexing?

Care to post your INDEX formula?
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209

ADVERTISEMENT

On 2002-11-08 10:00, Qrackerman wrote:
=INDEX(Query!D2:D200,A1,1)

=IF(INDEX(Query!$D$2:$D$200,A1,1),INDEX(Query!$D$2:$D$200,A1,1),"")

If you install the morefunc.xll add-in from

http://longre.free.fr/english/index.html

=IF(SETV(INDEX(Query!$D$2:$D$200,A1,1)),GETV(),"")

Note that the above formulas do not check whether A1 >= 1. Moreover, it doesn't differentiate a real zero and an empty cell from Query. These are treated alike.
 

Qrackerman

New Member
Joined
Nov 7, 2002
Messages
6
I tries the 1st formula, it did not work. I will install the addin soon, but the cell being indexed either has a letter(like a revision level) or it has no entry at all. Will the 2nd formula work for that??
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209

ADVERTISEMENT

On 2002-11-08 10:20, Qrackerman wrote:
I tries the 1st formula, it did not work. I will install the addin soon, but the cell being indexed either has a letter(like a revision level) or it has no entry at all. Will the 2nd formula work for that??

Change them to:

=IF(LEN(INDEX(Query!$D$2:$D$200,A1,1)),INDEX(Query!$D$2:$D$200,A1,1),"")

=IF(LEN(SETV(INDEX(Query!$D$2:$D$200,A1,1))),GETV(),"")

for "text" data.
 

Forum statistics

Threads
1,144,218
Messages
5,723,069
Members
422,477
Latest member
pete101

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top