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

Else condition always happening
VBA macro not working when sent to some but not all people
Move the csv file(s) from the active folder to the sub-folder “archive”
Replacing colors in excel workbook with VBA
Anyone know how to get macro (Excel VBA) to stop when there is no next button
Update a range if the source cell is not blank, otherwise skip to next
Excel VBA - Complex code issue
Delete slicers connected to seperate source data in same workbook
Excel select rows with missing data and copy the selected rows
Excel Add-in Row Index and Values are returned as undefined
Running an Excel Add-in function using VBA on remote desktop
vba loop to add to string- Current code overwrites instead of adding to cell
Drop-down values missing when using Range formula
Best API to read/write EXCEL documents with spring mvc
How to use FpSread.SaveExcel to save multiple grid data into multiple sheets of same excel file
Find word in part of cell text, return column number: Excel VBA

Categories

HOME
gnuplot
centos
arduino
phpunit
bitcoin
scenekit
mapkit
outlook-addin
inform7
chat
ios8
crc
crc32
android-toast
relation
angularjs-ng-transclude
astyle
biopython
gulp-sass
image-comparison
cpu-registers
visualvm
unimrcp
fork
google-cloud-vision
jqxwidgets
cut
angle
pdb-files
tensorflow-serving
nestedscrollview
kernel-module
responsive-filemanager
nn
uicollectionviewcell
apache-hive
smtpclient
redhat-bpm
meta-tags
shieldui
media-type
falcor
reduce
o365rwsclient
tiles
terminal-emulator
jquery-events
google-keep
rollbar
gyp
voxel
windows-firewall-api
self-referencing-table
turtle-rdf
sequencing
htsql
review-board
webtorrent
oql
ionic-view
inventory
youtube-javascript-api
ti-nspire
7digital
childviewcontroller
apache-roller
treenode
circular-buffer
allocation
pegjs
syntactic-sugar
teamcity-7.1
string-conversion
microsoft-commerce-server
tiles2
craftyjs
android.mk
amber-smalltalk
pubchem
plcrashreporter
scalaquery
pasteboard
google-instant-previews
www-mechanize
xml-comments
stack-unwinding
zend-navigation
dynamic-css
paint.net
id-generation
orbited
progressive-enhancement
google-notebook

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile