Hello everyone
I have a task that I don't know how to do.
I have two sheets in a sheet, in each one I have an ID of numbers, I need to know what formula to use so that if in the first sheet, there is an ID and in the second there is also that same ID, the cell in the first one is painted color sheet
Example
Sheet 1 Sheet 2
a A
1|ID 1| id
2| 14584 2| 14584
3| 14587
In this case, paint cell a2 because there is that id in the second sheet
I was thinking about applying conditional formatting to the entire column a in Sheet 1 but I don't know what custom formula to use to check data from another sheet
Solved! Go to Solution.
I should start by saying this forum is for Appsheet Help, but below should help you.
To achieve this, you can use conditional formatting in Google Sheets with a custom formula that checks for matching IDs between two sheets. Here's a step-by-step guide to accomplish this:
1. **Open your Google Sheets document** and go to the first sheet where you have the IDs (Sheet 1).
2. **Select the range** in column A where you want to apply the conditional formatting. For example, if your IDs are in cells A2:A100, select this range.
3. **Go to the menu bar** and click on `Format` > `Conditional formatting`.
4. In the Conditional format rules pane on the right, ensure the selected range is correct.
5. Under the "Format cells if" section, select `Custom formula is`.
6. Enter the following formula:
```
=ISNUMBER(MATCH(A2, INDIRECT("Sheet2!A:A"), 0))
```
Explanation:
- `A2` refers to the current cell in the range you are applying the conditional formatting to.
- `INDIRECT("Sheet2!A:A")` refers to the entire column A in Sheet 2.
- `MATCH(A2, INDIRECT("Sheet2!A:A"), 0)` checks if the value in A2 (from Sheet 1) exists in column A of Sheet 2.
- `ISNUMBER` is used because MATCH returns a number if a match is found and an error if it is not.
7. Choose the formatting style you want to apply when the condition is met (e.g., changing the background color).
8. Click `Done` to apply the conditional formatting rule.
9. The cells in Sheet 1 column A will now be highlighted if their values exist in Sheet 2 column A.
This approach ensures that any ID in Sheet 1 that also appears in Sheet 2 will be highlighted based on the conditional formatting rule you've set up.
Is this related to Google Sheets or Appsheet?
I should start by saying this forum is for Appsheet Help, but below should help you.
To achieve this, you can use conditional formatting in Google Sheets with a custom formula that checks for matching IDs between two sheets. Here's a step-by-step guide to accomplish this:
1. **Open your Google Sheets document** and go to the first sheet where you have the IDs (Sheet 1).
2. **Select the range** in column A where you want to apply the conditional formatting. For example, if your IDs are in cells A2:A100, select this range.
3. **Go to the menu bar** and click on `Format` > `Conditional formatting`.
4. In the Conditional format rules pane on the right, ensure the selected range is correct.
5. Under the "Format cells if" section, select `Custom formula is`.
6. Enter the following formula:
```
=ISNUMBER(MATCH(A2, INDIRECT("Sheet2!A:A"), 0))
```
Explanation:
- `A2` refers to the current cell in the range you are applying the conditional formatting to.
- `INDIRECT("Sheet2!A:A")` refers to the entire column A in Sheet 2.
- `MATCH(A2, INDIRECT("Sheet2!A:A"), 0)` checks if the value in A2 (from Sheet 1) exists in column A of Sheet 2.
- `ISNUMBER` is used because MATCH returns a number if a match is found and an error if it is not.
7. Choose the formatting style you want to apply when the condition is met (e.g., changing the background color).
8. Click `Done` to apply the conditional formatting rule.
9. The cells in Sheet 1 column A will now be highlighted if their values exist in Sheet 2 column A.
This approach ensures that any ID in Sheet 1 that also appears in Sheet 2 will be highlighted based on the conditional formatting rule you've set up.
It works finally thanks you so much for explain
User | Count |
---|---|
17 | |
14 | |
8 | |
7 | |
4 |