Excel Formula help

Stuart J

Member
Mixed Farmer
Location
UK
I'm trying to create a IF formuala, so that if the value of A12 equals a word in a particular column (R) , then I want the formula to return a value of the word in cell V2.

Struggling!
 

Jerry

Member
Mixed Farmer
Location
Devon
It should be something like this:

formula need to be in V2

if(a12=“r1:r100,a12,0)

I’d need to check it though when I’m sat at computer and not in a field!!
 

mezz

Member
Location
Ireland
I'm assuming column R contains multiple words and you basically want to check if value in A12 is contained in column R.

No straight forward way to do it. Simplest way is possibly to do a vlookup of the value and see if it returns an error (meaning it's not there). Could also use index function instead of vlookup
=if(iserror(vlookup(A12,R1:R100,1,FALSE)),"",V2)
 

Stuart J

Member
Mixed Farmer
Location
UK
It's for a spray record spreadsheet. So when I select Proline from the product list, it then automatically puts 'disease control' into the next cell, and a default rate of 1 l/ha in the next one?
 

bitwrx

Member
Is INDEX, MATCH not the jobby for this? Not at a computer, so can't check, but it's a standard combination of formulas that works where VLOOKUP doesn't.

Google will tell you the rest. :)
 

mezz

Member
Location
Ireland
Is INDEX, MATCH not the jobby for this? Not at a computer, so can't check, but it's a standard combination of formulas that works where VLOOKUP doesn't.

Google will tell you the rest. :)
Vlookup will work fine in this case, but index match is preferred, because it is less likely to break if the spreadsheet layout is changed.
 

Ukjay

Member
Location
Wales!
Would this help you - its not overly complicated but then you can easily edit everything - you just need to add something similar to the appropriate cells?

Start with Validating a set of words for column A (I have shown the range in lines 07 to 11):
Screen Shot 2021-01-18 at 17.26.38.png



Then use the IF for cell B2 could be like this:

Screen Shot 2021-01-18 at 17.26.48.png


Then use an IF statement in C2 could be like this:

Screen Shot 2021-01-18 at 17.26.55.png


The result gives this:

Screen Shot 2021-01-18 at 17.27.05.png


Screen Shot 2021-01-18 at 17.27.18.png


Screen Shot 2021-01-18 at 17.27.25.png
 
One list of products and one list of fields (things you already have and don't want to retype every time).
One live sheet that references and looks up those via pick lists
Separates calculations from constants and enables things to be hidden away.
 

Attachments

  • sprayexample.zip
    27.2 KB · Views: 0
Would this help you - its not overly complicated but then you can easily edit everything - you just need to add something similar to the appropriate cells?

Start with Validating a set of words for column A (I have shown the range in lines 07 to 11):

use an IF statement in C2 could be like this:

Agree with validating input, but nested IFs are nature's way of telling you to use a vlookup. And IIRC you can only do 8 levels of nesting them (up to Excel 2010 at least). Reference a named range (rather than a cell range) with a vlookup then if that range changes e.g. a new product or field, then it will accomodate the new line in the looked up data without having to edit the formula.
 

Bloders

Member
Location
Ruabon
i think xlookup is more versatile than vlookup?
Ive being doing some excel stuff to compare lists of animals to spot anyy missing animals or duplicates. Similar sort of use in many ways.
 

Exfarmer

Member
Location
Bury St Edmunds
Have no knowledge of Xlookup or Vlookup so may be talking rubbish, but I think you need a Data base such as Access
it takes a fair bit of work to get into, but after some practice it is amazing what it will do
 

SFI - What % were you taking out of production?

  • 0 %

    Votes: 103 40.7%
  • Up to 25%

    Votes: 92 36.4%
  • 25-50%

    Votes: 39 15.4%
  • 50-75%

    Votes: 5 2.0%
  • 75-100%

    Votes: 3 1.2%
  • 100% I’ve had enough of farming!

    Votes: 11 4.3%

May Event: The most profitable farm diversification strategy 2024 - Mobile Data Centres

  • 1,267
  • 22
With just a internet connection and a plug socket you too can join over 70 farms currently earning up to £1.27 ppkw ~ 201% ROI

Register Here: https://www.eventbrite.com/e/the-mo...2024-mobile-data-centres-tickets-871045770347

Tuesday, May 21 · 10am - 2pm GMT+1

Location: Village Hotel Bury, Rochdale Road, Bury, BL9 7BQ

The Farming Forum has teamed up with the award winning hardware manufacturer Easy Compute to bring you an educational talk about how AI and blockchain technology is helping farmers to diversify their land.

Over the past 7 years, Easy Compute have been working with farmers, agricultural businesses, and renewable energy farms all across the UK to help turn leftover space into mini data centres. With...
Top