I have two google worksheet one named sample1 and another sample2. I have value 2 in A1 of sample1, now can I check if sample2 A1 is equal to A1 of sample2 which should also be 2, if false, set color to red.
To use values from another page of the spreadsheet, in a custom conditional formatting function, use the function:
Additional Reference: Role of Indirect Function in Conditional Formatting in Google Sheets