VBA to pull text out of cell

helpexcel

Well-known Member
Joined
Oct 21, 2009
Messages
656
Hi - Is there a way to say look in A10 and if the word "March" appears, put "March" in B10?

Thanks!
 
That is showing columns A-F. I altered your formula slightly =IF(ISNUMBER(SEARCH(=CONCATENATE("In"," ","March"),A10)),"March","") because i wanted to bucket the months into In(Column C) and Out(Column E). I then want to sum each "In" month in column A and put that in the corresponding row in Column D. Same for the "Out" months.
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Is this what you mean.
In D2 copied down
=SUMIF($A$2:$A$13,$C$1&" "&C2,$B$2:$B$13)
 
Upvote 0
WOW, do i tend to overthink things. Very simple solution, THANK YOU. I need to populate the months first, but I can handle that.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Sorry one last iteration. instead of breaking it out by month and totaling, Is there a way to change this "=SUMIF($A$2:$A$13,$C$1&" "&C2,$B$2:$B$13)" to say sum all values in column A that start with "in"?
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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