excel


Does excel have an if statement equivelent? I can't get this program to work


The program has 5 columns.
Column A has item names
Column B has item sizes
Column C has item quantities
Column D has items that i need
Column E has the sizes for those items in the rows corresponding to the items
Most items do not have multiple sizes, but for the ones that do, there will be multiple entries of that item in column A.
What I need to do is take all the items from column D and find them in column A and give me the corresponding quantity from C.
I have been using this code to achieve this. =INDEX(C:C,MATCH(D:D,A:A,0))
This works for all items besides the ones with multiple sizes. For these items it just spits back the first size number every time.
Would there be a way to match A and D, and then check if there is a value in the size column, if so, give out the correct number?
I see how my wording is confusing here is an example of what I mean.
apples 5lb bag 12 apples 10lb bag
apples 10lb bag 13
bananas 5 grapes
grapes 7
Which using the is line of code "=INDEX(C:C,MATCH(D:D,A:A,0)) " would result in giving me the correct "7" for the grapes, but for the apples, it would give me the first result it comes across, which is the 12.
How would I get it to check the other columns to give me the 13 for apples?
If I understand correctly then this will get you the correct number:
=IF(E2<>"",SUMIFS(C:C,A:A,D2,B:B,E2),SUMIFS(C:C,A:A,D2))

Related Links

Calculate SUM based on date
Need to transpose multiple excel rows to columns [duplicate]
Text to Time with Milliseconds
Exclude rows with formulas from range in macro
Formating excel percentage decimals
Excel VBA - Looking for Strings in “Text Block” , then look in the next
make one cell value 0 if other cell value > 0 using excel
Conditional AGGREGATE/Median in Excel 2010
Excel VBA filtering a column and then copying each item in the area collection to a matching row
Excel addition of multiple numbers in single cell
How do I autofill code in VBA?
Use excel VBA to update master list based on user input data
Change number format of a cell which inlude currecny using visual basic
Access reading Excel VBA date in US format
Changing a file name and path in a formula (within a macro) to user-defined
Excel conditional formating - conditional on sum of all previous cells and total sum

Categories

HOME
web
google-analytics
rx-java
ruby-on-rails-4
composer-php
accounting
analytics
integration-testing
iis-8
ejb
soundcloud
rectangles
interaction
conv-neural-network
emu8086
nlog
swtbot
formsets
affiliate
pi4j
jqassistant
ipc
puma
transfer-function
hashcode
bspline
c#-6.0
interstitial
gold-parser
paypal-adaptive-payments
reduce
o365rwsclient
family-tree
lpc
icingaweb2
doubly-linked-list
vorlon
powerview
apple-search-ads
simplehttpserver
audio-player
z-order
imshow
nested-function
agile-project-management
kmip
nscoding
pdf-extraction
cirqus
jlist
webots
bullseye
avm2
sin
amdatu
er-diagrams
compiler-options
worksite-sdk
enplug-sdk
mysql-num-rows
opencv-features2d
hasp
httpwatch
factoring
apiaxle
postfix-operator
perl-critic
ios6.1
file-association
mysql-error-1052
ctime
nspasteboard
silverlight-embedded
viewexpiredexception
nscoder
blat
pvcs

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App