Extracting Values of Cells with Multiple Lines

jdykema70

New Member
Joined
Aug 23, 2018
Messages
1
Hello,
I am trying to determine how I can search cell contents for specific values (a calendar week value) and then extract the corresponding value entered on an adjacent cell that are the hours worked in that week for a given project.

I cannot import an image or screen shot, so I will try to explain a bit more. For example in A2 I have multiple lines separated by the ALT+ENTER key combo. There potentially could be ss many as 53 lines in that cell (of which there would be many rows based on various projects - each project gets a new excel row) because of the number of potential calendar weeks in a year.

Adjacent to that A2 cell (A1) are entries for the hours worked for each line in A2. I'd like to search the cells in a given column for a calendar week, let's say 34 and then "look" in the A1 cell for a number entry to extract into A3 for example. Maybe I can type out a "format" below:

A1 Contents: A2 Contents:

2 32
12 33
8 34

So I want to pull how many hours my guy worked in calendar week 33. I would like my formula to search all the cells in column A for "33" and then look in the adjacent cell, A1, for the value entered on the "same line." In this case I should get 12. And of course if there are multiple cells that have 33 in them I would have the total hours my guy worked on various projects for CW33.

I hope I explained this well and any help is appreciated.

Best Regards,
Jeff
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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