Extract data from cells based on cell reference

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am trying to extract all entries of data from a report dependant on a alpha numeric reference

THE LIST
Column B has the reference, which constantly changing entries and amounts
Column H has the part reference number in it

CA2 has the desired alpha numeric number to report

In CC2 I would like this to show the first part numer
in CC3 the next one
in CC4 next one

upto 50 entries if they are in the "LIST"

hope this makes sense

many thanks for any help
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try this:
Code:
Sub Search_Me()
'Modified 3-4-18 1:25 AM EST
Application.ScreenUpdating = False
Dim ans As String
Dim b As Long
Dim c As Range
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "B").End(xlUp).Row
b = 2
ans = Range("CA2").Value
    For Each c In Range("B1:B" & Lastrow)
        If c.Value = ans Then Cells(b, "CC").Value = c.Offset(0, 6).Value: b = b + 1
    Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,189
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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