Part 1 Vlookup inquiry -
I have a workbook I want to reference another sheet with the workbook pull in information based on the following 3 condition.
1. I want to pull in info when and id on the destination sheet matches the source sheet.
2. I want it to assign a text value when the destination has a text value in one of the columns
3. I want to assign a text value when a date in one of the columns is greater than 6/30/2015.
I need no.# 1 to supersede both no.#2 and no.#2 to supersede number 3.
In cases where none of these conditions are met, I want it to return the value "NOT EVALUATED"
Here's the formula how I have it written currently:
=IFERROR(IF(B585="VACANT","VACANT",IF(G585>DATEVALUE("6/30/2015"),"New Hire",(VLOOKUP(A585,rating,12,FALSE)))),"NOT EVALUATED")
The was it is writen now it doesn't seem to be honoring the vlookup first. I'd tried changing around
the order but that didnt work.
Part 2. I would like to convert the following formula to an index formula. I got a lot going on in the spreadsheet and vlookup takes too long to calculate.
Here's my attempt at an index formula thus far:
=IFERROR(IF(B5="VACANT","VACANT",IF(INDEX(rating!L:L,MATCH(Allstaff!A5,rating!A:A,0))=(INDEX(rating!L:L,MATCH(Allstaff!A5,rating!A:A,0)))=TRUE,(INDEX(rating!L:L,MATCH(Allstaff!A5,rating!A:A,0))),IF(G5>DATEVALUE("6/30/2015"),"New Hire"""))),"NOT EVALUATED")
The formula about doesnt seem to be honoring the datavalue portion of the formula.
Part 3. The last step is including this in my vba script.
I tried just recording a macro when I typed it and I get an error. Error states "Run - Time error '1004':
Unable to set the FormulaArray property of the Range class.
Here the vba script:
Selection.FormulaArray = _
"=IFERROR(IF(INDEX(rating!C[-84],MATCH(Allstaff!RC[-95],rating!C[-95],0))=(INDEX(rating!C[-84],MATCH(Allstaff!RC[-95],rating!C[-95],0)))=TRUE," & Chr(10) & "(INDEX(rating!C[-84],MATCH(Allstaff!RC[-95],rating!C[-95],0))),IF(RC[-94]=""VACANT"",""VACANT"",IF(RC[-89]>DATEVALUE(""6/30/2015""),""New Hire""""""))),""NOT EVALUATED"")"
Range("CR3").Select
Sorry for the long question but I've been trying to troubleshoot this for days. Any help would be
very very very much appreciated.
Jamel
I have a workbook I want to reference another sheet with the workbook pull in information based on the following 3 condition.
1. I want to pull in info when and id on the destination sheet matches the source sheet.
2. I want it to assign a text value when the destination has a text value in one of the columns
3. I want to assign a text value when a date in one of the columns is greater than 6/30/2015.
I need no.# 1 to supersede both no.#2 and no.#2 to supersede number 3.
In cases where none of these conditions are met, I want it to return the value "NOT EVALUATED"
Here's the formula how I have it written currently:
=IFERROR(IF(B585="VACANT","VACANT",IF(G585>DATEVALUE("6/30/2015"),"New Hire",(VLOOKUP(A585,rating,12,FALSE)))),"NOT EVALUATED")
The was it is writen now it doesn't seem to be honoring the vlookup first. I'd tried changing around
the order but that didnt work.
Part 2. I would like to convert the following formula to an index formula. I got a lot going on in the spreadsheet and vlookup takes too long to calculate.
Here's my attempt at an index formula thus far:
=IFERROR(IF(B5="VACANT","VACANT",IF(INDEX(rating!L:L,MATCH(Allstaff!A5,rating!A:A,0))=(INDEX(rating!L:L,MATCH(Allstaff!A5,rating!A:A,0)))=TRUE,(INDEX(rating!L:L,MATCH(Allstaff!A5,rating!A:A,0))),IF(G5>DATEVALUE("6/30/2015"),"New Hire"""))),"NOT EVALUATED")
The formula about doesnt seem to be honoring the datavalue portion of the formula.
Part 3. The last step is including this in my vba script.
I tried just recording a macro when I typed it and I get an error. Error states "Run - Time error '1004':
Unable to set the FormulaArray property of the Range class.
Here the vba script:
Selection.FormulaArray = _
"=IFERROR(IF(INDEX(rating!C[-84],MATCH(Allstaff!RC[-95],rating!C[-95],0))=(INDEX(rating!C[-84],MATCH(Allstaff!RC[-95],rating!C[-95],0)))=TRUE," & Chr(10) & "(INDEX(rating!C[-84],MATCH(Allstaff!RC[-95],rating!C[-95],0))),IF(RC[-94]=""VACANT"",""VACANT"",IF(RC[-89]>DATEVALUE(""6/30/2015""),""New Hire""""""))),""NOT EVALUATED"")"
Range("CR3").Select
Sorry for the long question but I've been trying to troubleshoot this for days. Any help would be
very very very much appreciated.
Jamel