find a value on the same row, return the cell to the left of it!

ellison

Active Member
Joined
Aug 1, 2012
Messages
343
Office Version
  1. 365
Platform
  1. Windows
Hi all, I'm after a formula to search for a string of text in range which is in the same row, and return the value of the cell to the left of where that value has been found.

So for example cell A contain Names, then row B is where I'd like my "goal" to be, then columns C to G is the range of values that I'd like to use to find my goal.

i.e.
Names
Goal
Col C
Col D
Col E
Col E
Col F
Col G
David
2
1
terry
2
David
66
anthony
Peter
67
11
john
36
james
67
PETER

<tbody>
</tbody>

(I'd like to use a formula - as opposed to a macro. And I'd like the search to "not" be case sensistive

I've found a few pointers to do with indexes, matches and offsets, but I'm really struggling!

Best Regards
Neil
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi,

From Column C on, can the same Name appear more than once?

BTW, you have TWO column E in your sample.
 
Upvote 0
Maybe

Excel 2013 32 bit
ABCDEFGH
1NamesGoalCol CCol DCol ECol ECol FCol G
2David21terry2David66anthony
3Peter6711john36james67PETER
Sheet1
Cell Formulas
RangeFormula
B2=INDEX(C2:H2,,MATCH(A2,C2:H2,0)-1)
 
Upvote 0
Crumbs, that's absolutely brilliant. My head will be eternally grateful as I can stop scratching it!:ROFLMAO:
 
Upvote 0
Glad we could help & thanks for the feedback.

BTW If you have two or cells with the same name from col C onwards this will simply take the first name.
 
Upvote 0
Since you ignored my question from Post #2 , how about this simple formula using just SUMIF:


Book1
ABCDEFGH
1Names
2David21terry2David66anthony
3Peter6711john36james67PETER
Sheet68
Cell Formulas
RangeFormula
B2=SUMIF(D2:H2,A2,C2:G2)


Formula copied down.
 
Upvote 0
many thanks - and many apologies, wasn't ignoring. All help very much appreciated!
 
Upvote 0
No problem at all, you're very welcome.

SUMIF is the simplest way to go based on your current data.
 
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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