IF x then VLookup and sum, IF Y then VLookup and sum

Closed
Unnefable Posts 1 Registration date Monday September 9, 2013 Status Member Last seen September 9, 2013 - Sep 9, 2013 at 08:45 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Sep 10, 2013 at 10:43 AM
Hi guys,

This is my first post here so I hope I'm doing it right and that someone might help me out.

I'm working on a spreadsheet where I insert a bunch of tickers.

I then have a separate spreadsheet where I want to do the following.

lets say, cell A1 =IF (Cell B2=Yes I want it to search a data range for a text value "Peugeot" then I want it to give me the number of times that "Peugeot" comes up) IF (Cell B2=No I want it to search a different data range for the same text value "Peugeot" and give me the number of times that "Peugeot" comes up) if neither one finds "Peugeot" then 0.

I hope I made myself clear.

I appreciate any help that you might give me.

Thanks
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Sep 10, 2013 at 10:43 AM
Hi Unnefable,

Change the ranges in the following formula to match yours:
=IF(B2="Yes",COUNTIF(C1:C10,"Peugot"),ALS(B2="No",COUNTIF(D1:D10,"Peugot"),"Enter either Yes or No in B2"))

Best regards,
Trowa

Monday, Tuesday and Thursday are usually the days I'll respond. Bear this in mind when awaiting a reply.
0