Padthelad

Board Regular
Joined
May 13, 2016
Messages
64
Office Version
  1. 2016
Platform
  1. Windows
I'm having trouble inserting and extra if function at the beginning of my formula.

I have a 'Job sheet' which informs my workshop of what to produce based on what has been quoted (information for the job sheet is gathered from another sheet in the same workbook).

Currently, I have the following table:-
A
B
C
D
E
F
G
H
4
Building Type
Quantity
Size
Notes
Timber Skids
Galv Skids
Timber Base
Concrete Base
5
Badminton
1
3x3
Window
3x3
6
Windsor
1
4x4
no window

<tbody>
</tbody>

Cell B5 contains the formula =IFNA(INDEX(Quote!$A$13:$A$31,MATCH(A5,Quote!$B$13:$B$31,0)),0) which returns the value in the column that relates to 'Badminton' on the quote sheet in the same workbook.

Cell C5 contains the formula =IFERROR(VLOOKUP(+A5,Quote!$B$13:$C$31,2,0),0) which returns the value in the 'size' column on the quote sheet.

Cell G5 has the formula =IFERROR(VLOOKUP(+G4,Quote!$B$13:$C$31,2,0),0) which returns the value in the corresponding column next to 'Timber base' from my quote sheet.

The problem I am having is that there are other items on my job sheet that could potentially have a 'timber base'. At the moment, when 'timber base' is entered on the quote sheet, all the 'timber base' job sheet items are highlighted.

One workaround I have considered inserting a set of IF function at the beginning of my current formula to effectively say 'if there is a value in B5 AND C5 then do the the formula ( =IFERROR(VLOOKUP(+G4,Quote!$B$13:$C$31,2,0),0) )'

OR:-

Is there a specific formula that can 'return timber base value that is related to building type'

I'm having trouble getting my head round the logic of this.

Any help anyone can provide is very much appreciated.

Thanks,

Pad
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
One workaround I have considered inserting a set of IF function at the beginning of my current formula to effectively say 'if there is a value in B5 AND C5 then do the the formula ( =IFERROR(VLOOKUP(+G4,Quote!$B$13:$C$31,2,0),0) )'
Hi Pad,

based on this suggestion, does this work?

=IF(AND(B5<>"",C5<>""),IFERROR(VLOOKUP(+G4,Quote!$B$13:$C$31,2,0),0),"")
 
Upvote 0
Hi Pad,

based on this suggestion, does this work?

=IF(AND(B5<>"",C5<>""),IFERROR(VLOOKUP(+G4,Quote!$B$13:$C$31,2,0),0),"")


Hi Fishboy,

Thanks for your reply. The formula seems to work, but not quite as intended.

This may frustrate you, but I have decided to use a different formula in cell G5 which is:-

=IFNA(INDEX(Quote!$A$13:$A$31,MATCH(G4,Quote!$B$13:$B$31,0)),0)

When I amend my formula to include yours:-

=IF(AND(B5<>"",C5<>""),IFNA(INDEX(Quote!$A$13:$A$31,MATCH(G4,Quote!$B$13:$B$31,0)),0),"")

It still returns the value of having a 'timber base'. Which relates to another building, see below:-

Mobile Field ShelterQuantitySizeNotesTimber SkidsGalvanised SkidsTimber BaseConcrete Base
Badminton0000010
Windsor14x4left window0010

<colgroup><col><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>

Quote is showing as 'Windsor' with a 'timber base'. Formula in cell G6 is:-

=IF(AND(B6<>"",C6<>""),IFNA(INDEX(Quote!$A$13:$A$31,MATCH(G4,Quote!$B$13:$B$31,0)),0),"")

As you can see from the table above, the timber base is highlighted whether cells B6 or C6 have values in them.

Thanks for you help, further suggestions are gratefully received.

Thanks,

Pad
 
Upvote 0
No worries Pad, but unfortunately for me the IFNA function does not work with the version of Excel I am rocking, so I am afraid there is little more use I can be here. I hope you are able to find a suitable solution mate ;)
 
Upvote 0

Forum statistics

Threads
1,216,031
Messages
6,128,424
Members
449,450
Latest member
gunars

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