Autofill if both text criteria are met

fawn728

New Member
Joined
Nov 30, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
  2. Web
I want to use a formula/function that states if address one is in one column and address two is in the same row in the next column then column 3 should be this number. This is a travel log and I want it to autofill for several offices. So if Washington County and Clinton County are next to eachother the next column should say 26. I need to do that for appx. 12 combination of addresses.
 

Attachments

  • Clipped_image_20231130_120549~5.png
    Clipped_image_20231130_120549~5.png
    168.2 KB · Views: 7

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Assuming your mileage table is on a different sheet, how about this:

Sheet1 = sheet with mileage you want to autofill from mileage table
Book1
ABCD
1Commute Miles (Y or N)Departed From (City,State)Arrived At (City,State)Mileage
2Washington CountyClinton County26
3Washington CountyWashington County 
4Washington CountyJefferson County29
5Jefferson CountyClinton County 
6Clinton CountySt Rose Dev Club 
Sheet1
Cell Formulas
RangeFormula
D2:D6D2=XLOOKUP(B2&C2,Sheet2!$A$2:$A$8&Sheet2!$B$2:$B$8,Sheet2!$C$2:$C$8,"")


Sheet2 = sheet with mileage table combinations
Book1
ABC
1DepartArriveMileage
2Washington CountyMarion County43
3Washington CountyClinton County26
4Clinton CountyBond County16
5Washington CountyBond County42
6Washington CountyJefferson County29
7Clinton CountyJefferson County50
8Clinton CountyMarion County32
Sheet2
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,687
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top