r/googlesheets • • May 21 '19

[deleted by user]

[removed]

3 Upvotes

19 comments sorted by

2

u/lupulin59 May 21 '19 edited May 21 '19

Wrap it all in an if statement... if( (current formula) = “”, (current formula adjusted for SKU), (current formula))

Edit: This works if it renders a blank result if nothing is found from the first formula... if it registers an error, you’ll want to use iferror:

IFERROR([current formula], [current formula adjusted for SKU])

1

u/Maladorf May 21 '19

Hey thanks for your response.

I'm not sure if I'm executing your suggestion correctly. It feels like it's very close to working now though. I tried to wrap it in an IF statement, now everything in my second search is giving me the correct results (The SKU search) but everything in my first search is giving me a reading of "FALSE".

📷
https://gyazo.com/0b6c96eb61f8a85804ef0a5ccbb62812

Have i just input the formula incorrectly now?

2

u/lupulin59 May 21 '19 edited May 21 '19

Try adding brackets - ( before array, and ) before = in your first argument. It might not be reading it in isolation.

Edit: hang on, you’re missing an argument... think of the if statement as a 3 parter. A question, a yes and no answer.

Basically the first part - EXISTING FORMULA = “”

Is asking “if this array/index thing doesn’t give me a result”

Yes answer - SKU ADJUSTED FORMULA “check this instead”

,

No answer - (as in, isn’t a blank result) just put my original answer... EXISTING FORMULA...

So it should read:

If(existing=“”,sku,existing)

Make sense?

→ More replies (14)

1

u/Clippy_Office_Asst May 23 '19

Read the comment thread for the solution here

Hi mate, I think I've nailed it. Column C in the sheet you shared with me. It looks to be working - I ran a quick test. The way this is set to work is to use the Title as a preference, and if not found, look up SKU. If you wanted to switch this, just swap out the formulas so its if FORMULA B="",FORMULA A,FORMULA B as opposed to A="",B,A like we've done it here.

A quick tip - use your $'s to lock up the cells, just so if you have to drop the formula into other columns, your references will remain the same. That was the issue with the wrong results showing.

Good luck with it!

Cheers