Hi all
I've only just discovered VBA yesterday so go easy on me. Basically I have a spreadsheet which has validation list in column B, C and E. Column B is a list of Trade types, column C is a list with option 'Labour' or 'Material'. I currently have coding set up to auto populate column E, where if column C is 'Labour', the validation list in column E on the same row prefills to say 'HR', otherwise it remains blank until one of the other three values are selected.
What I would now like to do is use a formula such as =IF(C5="Labour",VLOOKUP($B5,$A$112:$B$145,2,FALSE),0) to say if column C is 'Labour', it uses a vlookup to also auto populate an hourly rate in column F for that Trade type selected in Column B, using a table. This is in addition to the Rate in Column E auto populating.
I do not want to just use a formula for this, as I want the cells in the hourly rate column F to remain blank so that you can still freetype into the cells within losing the formula should the Rate type not be HR.
Sheet attached.
Any help would be great! I have found other posts re VBA and vlookup, but nothing with IF that I can copy straight off.
Bookmarks