Auto fill group data using info from another worksheet? - Formula Needed

Robzx

New Member
Joined
Jun 5, 2015
Messages
25
Hi everyone

I am looking for a formula rather than VBA code or a macro to transfer data from a master list on sheet 1 to autopopulate in sheet 2 based on IDs and Headers.

In sheet 1, I would have data such as


ABCDEFG
1IDNameDescriptionCurrencyValuePricing YearCategory
21.01Test 1Core DataGBP150002012Capital
31.02Test 2 CAD200002013Revenue
41.03Test 3 USD200002014Capital
51.04Test 4 USD300002012Revenue
61.05Test 5 USD400002015Revenue
71.06Test 6 USD500002015Revenue

<colgroup><col style="width:48pt" span="8" width="64"> </colgroup><tbody>
</tbody>















I want to populate sheet 2 automatically based on the header and ID to create

ABC
1IDNameValue
21.01Test 115000
31.02Test 220000
41.03Test 320000
51.04Test 430000
61.05Test 540000
71.06Test 650000

<tbody>
</tbody>














I guess that it is done using INDEX and MATCH, but what is the correct syntax in the formula?

Thank you
 
Last edited:

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi everyone

I am looking for a formula rather than VBA code or a macro to transfer data from a master list on sheet 1 to autopopulate in sheet 2 based on IDs and Headers.

In sheet 1, I would have data such as

ABCDEFG
1IDNameDescriptionCurrencyValuePricing YearCategory
21.01Test 1Core DataGBP150002012Capital
31.02Test 2CAD200002013Revenue
41.03Test 3USD200002014Capital
51.04Test 4USD300002012Revenue
61.05Test 5USD400002015Revenue
71.06Test 6USD500002015Revenue

<tbody>
</tbody>















I want to populate sheet 2 automatically based on the header and ID to create

ABC
1IDNameValue
21.01Test 115000
31.02Test 220000
41.03Test 320000
51.04Test 430000
61.05Test 540000
71.06Test 650000

<tbody>
</tbody>














I guess that it is done using INDEX and MATCH, but what is the correct syntax in the formula?

Thank you
Hi Robzx, welcome to the boards.

Based on your example data, you could use the following formula layout.

Assuming that on Sheet2 column A you have your ID's, in B2 you could enter this formula and drag-fill down the column to find all the corresponding names:

=INDEX(Sheet1!$B$2:$B$7,MATCH(Sheet2!A2,Sheet1!$A$2:$A$7,0))

=INDEX(Sheet1!$B$2:$B$7 is where you are expecting results from, in this case, the names from Sheet1 Column B

MATCH(Sheet2!A2 is the value you are using to lookup, in this case the ID from Sheet2 A2

Sheet1!$A$2:$A$7 is where you are searching for your lookup value.

If you then wanted to use this setup to find the values to go in Sheet2 column C, the formula would be updated to:

=INDEX(Sheet1!$E$2:$E$7,MATCH(Sheet2!A2,Sheet1!$A$2$:A$7,0))

Where Sheet1!$E$2:$E$7 is the column containing the required Value

I hope this helps.
 
Upvote 0
FORMULA NEEDED;

I too need to copy data from one worksheet to another.

I need to copy/link three different fields on worksheet "Master!" to worksheet "Send2". I would like "Send2" to be automatically updated anytime the data on "Master1" changes.

The three fields on Master1 are "Mobile Text Address", "Business Email" and "Personal Email Address".

The three above fields may or may not have data in them.

When the data is copied/linked to "Send2" I would like to omit/eliminate blank fields.

Any assistance would be greatly appreciated. I have been reading and research for nearly a week and I am not making much progress.

THANKS IN ADVANCE FOR YOUR ASSISTANCE!!!!
 
Upvote 0
I have been able to get this following to work.

Can someone please tell me how to make the following 3 subs run as one?

THANK SO VERY MUCH FOR YOUR HELP!!!!!



Sub Business_Email()
Dim cell As Range, r As Long
r = 1
Application.ScreenUpdating = False
Sheets("Sheet4").Range("A2:A3000").ClearContents
For Each cell In Sheets("Sheet1").Range("A1:A3000")
If Len(cell) > 0 Then
Sheets("Sheet4").Range("A" & r).Value = cell.Value
r = r + 1
End If
Next cell
Application.ScreenUpdating = True
End Sub
-----------------------------------------

Sub Personal_Email()
Dim cell As Range, s As Long
s = 1
Application.ScreenUpdating = False
Sheets("Sheet4").Range("C2:C3000").ClearContents
For Each cell In Sheets("Sheet1").Range("C1:C1000")
If Len(cell) > 0 Then
Sheets("Sheet4").Range("C" & s).Value = cell.Value
s = s + 1
End If
Next cell
Application.ScreenUpdating = True
End Sub
---------------------------------------------


Sub Carrier()
Dim cell As Range, s As Long
t = 1
Application.ScreenUpdating = False
For Each cell In Sheets("Sheet1").Range("E1:E1000")
If Len(cell) > 0 Then
Sheets("Sheet4").Range("E" & t).Value = cell.Value
t = t + 1
End If
Next cell
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,926
Members
449,479
Latest member
nana abanyin

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