IF statement help

J

J HART

Good Morning/Afternoon,

Was hoping for help with a complicated (to me!) excel issue. Seen other
use animals to try and explain there issues so will do the same, hope i
doesn't come off as patronising!

Basically I have reports sent to me with data, but if there is
quantity for an item it will not show up on the report.

For example if I got a report for the following:

Dogs - 1
Cats - 3
Birds - 0

Then the 'Birds - 0' entry (birds and 0 in seperate cells) would not b
in the report, but in the spreadsheet I am compiling I would need th
fact that there are no Birds represented.

At the moment I copy all the report data into an export sheet.

I need a forumula which will look if there is a cell with the wor
'Birds' in it in the export sheet, and if so get the number from th
adjacent cell in the main sheet. If not then put a 0 in the adjacen
cell in the main sheet.

Played around with IF statements but couldn't figure this one out.

Many thanks for any help
 
C

Claus Busch

Hi,

Am Thu, 16 May 2013 09:13:36 +0100 schrieb J HART:
For example if I got a report for the following:

Dogs - 1
Cats - 3
Birds - 0

animals in sheet Main and also in sheet Export in column A and the
quantity in column B.
Then in sheet Export B1:
=IFERROR(VLOOKUP(A1,Main!$A$1:$B$3,2,0),0)


Regards
Claus Busch
 
J

J HART

Claus said:
Hi,

Am Thu, 16 May 2013 09:13:36 +0100 schrieb J HART:
-

animals in sheet Main and also in sheet Export in column A and the
quantity in column B.
Then in sheet Export B1:
=IFERROR(VLOOKUP(A1,Main!$A$1:$B$3,2,0),0)


Regards
Claus Busch

Thanks for your reply.

Will clarify my situation a little sorry for being vague.

In MAIN sheet I have

Column A----Column B
dogs--------Quantity (0 if no figure)
cats---------Quantity (0 if no figure)
birds---------Quantity (0 if no figure)


In EXPORT I have:

Column A----Column B
dogs---------3
Cats----------1


No row for birds because there are none in the imported report. Also th
order of the entries can change in the export sheet. So even if in
separate weeks there are quantise for dogs they may not necessarily b
in the same cell both weeks.

Will your given formula, look for a 'birds' entry in column A in EXPOR
and if so then fetch the quantity from the adjacent cell in column
from EXPORT sheet and put it in column B in MAIN sheet, and if there i
no birds cell in column A in EXPORT then will it put a 0 next to th
birds cell in MAIN.

Sorry if I'm making this sound more complicated than it is, at first i
seemed like quite a simple problem to me but I can't figure out
working formula for it.

Many Thank
 
C

Claus Busch

Hi,

Am Thu, 16 May 2013 11:24:46 +0100 schrieb J HART:
In MAIN sheet I have

Column A----Column B
dogs--------Quantity (0 if no figure)
cats---------Quantity (0 if no figure)
birds---------Quantity (0 if no figure)

In EXPORT I have:

Column A----Column B
dogs---------3
Cats----------1

in sheet Main in B1:
=IFERROR(VLOOKUP(A1,Export!$A$1:$B$10,2,0),0)
and copy down


Regards
Claus Busch
 
J

J HART

Claus said:
Hi,

Am Thu, 16 May 2013 11:24:46 +0100 schrieb J HART:
-

in sheet Main in B1:
=IFERROR(VLOOKUP(A1,Export!$A$1:$B$10,2,0),0)
and copy down


Regards
Claus Busch



Thanks! Worked great - modified to purpose and not to look for birds o
course.

Kind Regard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top