I have to update some code written by another party. Original code
Want to add: or (LEFT('Data Sheet'!R2C24:R" & LastRowDS & "C24,5)=""18-19"") and tried but didn't work
How do I correct it?
Code:
ActiveCell.FormulaR1C1 = "=-SUMPRODUCT(--(LEFT('Data Sheet'!R2C2:R" & LastRowDS & "C2,10)=LEFT('Upload to Database'!RC1,10))," _
& "--(LEFT('Data Sheet'!R2C5:R" & LastRowDS & "C5,4)=LEFT('Upload to Database'!RC2,4))," _
& "--(LEFT('Data Sheet'!R2C9:R" & LastRowDS & "C9,4)=LEFT('Upload to Database'!RC3,4)), " _
& "--(LEFT('Data Sheet'!R2C24:R" & LastRowDS & "C24,4)=""2019"")," _
& "'Data Sheet'!R2C20:R" & LastRowDS & "C20)"
Want to add: or (LEFT('Data Sheet'!R2C24:R" & LastRowDS & "C24,5)=""18-19"") and tried but didn't work
Code:
ActiveCell.FormulaR1C1 = "=-SUMPRODUCT(--(LEFT('Data Sheet'!R2C2:R" & LastRowDS & "C2,10)=LEFT('Upload to Database'!RC1,10))," _
& "--(LEFT('Data Sheet'!R2C5:R" & LastRowDS & "C5,4)=LEFT('Upload to Database'!RC2,4))," _
& "--(LEFT('Data Sheet'!R2C9:R" & LastRowDS & "C9,4)=LEFT('Upload to Database'!RC3,4)), " _
& "--(LEFT('Data Sheet'!R2C24:R" & LastRowDS & "C24,4)=""2019"") or (LEFT('Data Sheet'!R2C24:R" & LastRowDS & "C24,5)=""18-19"")," _
& "'Data Sheet'!R2C20:R" & LastRowDS & "C20)"
How do I correct it?