Vlookup, iferror and sumifs query?

LesleyL

New Member
Joined
Mar 9, 2017
Messages
6
I am really not good at Excel and am battling to finish my formula. I apologise in advance if this has been answered before but I can't fidn the right formula.

The first part of my formula works really well. It basically looksup a Trade Discount percentage (from a named table) and delivers to the right cell, however, I want to be able to show a blank cell in both Price increase and Trade Discount if there is no cost price entered.

Apparently Vlookup only looks right and this field happens to be on the left. I tried to add the LEN & IF & SumIfs but can't get any of them right.

COST PRICE
PRICE INCREASE 2017
TRADE DISCOUNT
INSTALLATION COSTS
TOTAL COST PER BLIND
=IFERROR(VLOOKUP($T$3,suppliers,2,0),"")
=IFERROR(VLOOKUP($T$3,suppliers,3,0),"")
=IFERROR(VLOOKUP($F12,$Y$13:$AC$27,4,0),"")
=IFERROR(ROUND(S12*(1+$T12)*(1-$U12),2)+$V12,"")

<colgroup><col width="96"></colgroup><tbody>
</tbody>
This is entered manually
This looks at a field where I select a supplier from drop down list and the associated price increase from supplier
This looks at a field where I select a supplier from drop down list and the associated trade discount from supplier
This looks at a field where I select a product from drop down list and the associated installation cost is input
This works out the total COST price of the blind.
I now want to add a formula that if the cell to the left "Cost price" is blank, then this field remains blank. However, the minute I input the supplier in the drop down cell, it automatically puts in the percent increase. Even though I have added the Iferror formula???
I now want to add a formula that if the cell to the left "Cost price" is blank, then this field remains blank. However, the minute I input the supplier in the drop down cell, it automatically puts in the trade discount.
This formula works fine.
This formula works fine.

<tbody>
</tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Base something on this, I cant provide cell references as I dont know what range "suppliers" is set to.

=IF(OFFSET(B2,INDEX(C2:C4,MATCH(B1,B2:B4,1),1)-1,-1)="","",INDEX(C2:C4,MATCH(B1,B2:B4,1),1))

B1 is supplier name
B2 is top of supplier list
B2:B4 is supplier list
C2:C4 is price
A2:A4 is cost price

This will return blank is cost price of supplier is blank

UPDATE: Alternatively copy the cost price to the right of the suppliers range into a new column and modify your VLOOKUP.
Your formula should be IF(VLOOKUP()="","",VLOOKUP), not really IFERRROR
IFERROR will only occur if the supplier is not on the list
 
Last edited:
Upvote 0
Thank you Special-K99 but i can't get either of them to work. Is there anyway I could attach my spreadsheet to share so you can see what I am doing wrong? I'm really, really stupid with Excel and have bitten off more than I can chew :).


Base something on this, I cant provide cell references as I dont know what range "suppliers" is set to.

=IF(OFFSET(B2,INDEX(C2:C4,MATCH(B1,B2:B4,1),1)-1,-1)="","",INDEX(C2:C4,MATCH(B1,B2:B4,1),1))

B1 is supplier name
B2 is top of supplier list
B2:B4 is supplier list
C2:C4 is price
A2:A4 is cost price

This will return blank is cost price of supplier is blank

UPDATE: Alternatively copy the cost price to the right of the suppliers range into a new column and modify your VLOOKUP.
Your formula should be IF(VLOOKUP()="","",VLOOKUP), not really IFERRROR
IFERROR will only occur if the supplier is not on the list
 
Upvote 0
You cant attach files on this forum. There are tools on this forum for adding small spreadsheet images

https://www.mrexcel.com/forum/about-board/508133-attachments.html

Or upload the file to an online storage site and post a link to it, though some people may not download the file for fear of viruses.

I would prefer a spreadsheet to an image so I dont have to retype existing data.
 
Last edited:
Upvote 0
Once again, thank you Special-K99. I have figured a work around which seems to be working ok. I have moved my Lookup cells to a different sheet and named all the ranges. I have also hidden these columns so that it's not so messy but formulas still use those columns. Not sure if this is the right way in Excel but it's working for a dum-dum like me. :).

You cant attach files on this forum. There are tools on this forum for adding small spreadsheet images

https://www.mrexcel.com/forum/about-board/508133-attachments.html

Or upload the file to an online storage site and post a link to it, though some people may not download the file for fear of viruses.

I would prefer a spreadsheet to an image so I dont have to retype existing data.
 
Upvote 0

Forum statistics

Threads
1,216,085
Messages
6,128,732
Members
449,465
Latest member
TAKLAM

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
Back
Top