Find 1st instance in column A, paste corresponding value from column B into another cell and continue down until end of data

MrsFraser07

New Member
Joined
Aug 16, 2017
Messages
46
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm sure this is easy in VBA, just wondering if there is also a formula I could use? What I want to do is the following: Find the first instance of UWI using a lookup formula, then paste corresponding value from "Oil" into another cell on another sheet in my workbook. Then proceed to go down the "UWI" column until it reaches the end of the data for that specific UWI, and paste the corresponding "Oil" value in my other sheet. A pic of the other worksheet is below. I want to paste the "oil" values in columns B, G, L and so on.

The source data table below has multiple UWI's, so I want a formula (or VBA) to find the first one, copy all the "Oil" values within that UWI to another sheet and then move onto the new UWI and do the same. It is so tedious to copy and paste these values into my other worksheet so I'm wanting to automate it. I'm not very skilled at VBA but willing to try! Interested if there is a nested Lookup function way of doing this by formula as well. Thanks for any help.

UWI
Prod Date
Oil
(bbl/d)
00/05-06-001-24W1/0Nov/201150.01
00/05-06-001-24W1/0Dec/2011214.57
00/05-06-001-24W1/0Jan/2012155.88
00/05-06-001-24W1/0Feb/2012109.71
00/05-06-001-24W1/0Mar/201272.81
00/05-06-001-24W1/0Apr/201261.98
00/05-06-001-24W1/0May/201264.63
00/05-06-001-24W1/0Jun/201244.89
00/05-06-001-24W1/0Jul/201250.57
00/05-06-001-24W1/0Aug/201243.81
00/05-06-001-24W1/0Sep/201215.75
00/05-06-001-24W1/0Oct/201217.92
00/05-06-001-24W1/0Nov/201250.53
00/05-06-001-24W1/0Dec/201230.19
00/05-06-001-24W1/0Jan/201337.62


1732297472432.png
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hello! Let's clarify a little. You have a column with Daiams in the form of a month and year on the first sheet. On the second sheet there is a column with months from 1 to 12. How should the data be signed up?
In the columns of the B, G and L, these are different “UWI” or the same thing.
 
Upvote 0
Hello! Let's clarify a little. You have a column with Daiams in the form of a month and year on the first sheet. On the second sheet there is a column with months from 1 to 12. How should the data be signed up?
In the columns of the B, G and L, these are different “UWI” or the same thing.
The data sheet is simply in columns. There are thousands of rows of data. I want a formula or VBA code to lookup the UWI from Sheet #2 (eg. 00/05-06-001-24W1/0), go to my data sheet and find the very first instance of that UWI. Then I want it to paste the corresponding value from the "oil" column in the data sheet, and paste it in Sheet #2 in cell B5. Then find the second instance, and paste, etc. until it reaches the last value for that UWI. Kind of like a find, copy and paste array. Hope that helps clarify?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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