Michael Timpano
unread,Mar 20, 2023, 4:00:32 PM3/20/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
The following code below works, but I want to be able to compare data from two sheets but not include column E in the comparison part of the code, but be able to right the data from that column to the target sheet from the source sheet? Not sure if it is possible or not? Thanks in advance for this concern. Take care.
const sourceRange = source.getRange(2, 1, source.getLastRow() - 1, 17).getValues().filter(String)
// console.log(sourceRange)
const targetRange = target.getRange(2, 1, target.getLastRow() - 1, 17).getValues().filter(String)
// console.log(targetRange)
let acceptedList = targetRange.map( r => r.join(""))
sourceRange.forEach((r, i) => {
if (!~acceptedList.indexOf(r.join(""))) {
targetRange.push(r)
}
})