How to Fill a Column C based on text in Column A and B

raghuram.star

Board Regular
Joined
Sep 5, 2012
Messages
102
Hi I need your help to Fill/Assign a value in Column C based on text in Column A and B

Logic to fill "Direct/InDirect" in Column C if Column A contains text "Overhead" or Column B contains "TAG"

Sample Table will look like below

Column A
Column BColumn C
Project 1 RequirementsELE XDirect
Project 1 DevelopmentELE XDirect
Project 1 ReviewELE XDirect
Project 1 OverheadELE XInDirect
Project 2 RequirementsELE ZDirect
Project 2 DevelopmentELE ZDirect
Project 2 ReviewELE ZDirect
Project 2 OverheadELE ZInDirect
Project 1 RequirementsTAG Y
InDirect
Project 1 DevelopmentTAG YInDirect
Project 1 ReviewTAG YInDirect
Project 1 OverheadTAG YInDirect
Project 3 RequirementsELE WDirect
Project 3 DevelopmentELE WDirect
Project 3 ReviewELE WDirect
Project 3 OverheadELE WInDirect

<tbody>
</tbody>

Please help me...
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Paste this formula in cell C1 and drag it down:

=IF(OR(ISNUMBER(SEARCH("Overhead",A1)),(ISNUMBER(SEARCH("TAG",B1)))),"InDirect","Direct")
 
Upvote 0
Hi Arjan, Thanks for the reply.
But I am looking for a solution in Access!
I am wodering if there is an equivalent to it in Access. Any suggestions?
 
Upvote 0
Excuse me I didn't notice you asked the question for acces, in that case I have no solution for you unfortunately.
 
Upvote 0
Create a query using the following SQL statement

Code:
SELECT Sheet1.Field1, Sheet1.Field2, IIf(InStr(1,[Field1],"Overhead")>0 Or Instr(1,[Field2],"TAG"),"Indirect","Direct") AS Field3FROM Sheet1;
 
Last edited:
Upvote 0
But I am looking for a solution in Access!
What may have also led to the confusion is terminology. Column A, B, and C are distinctly Excel terms.
Excel has "columns and rows" while Access has "fields and records".
 
Upvote 0
What may have also led to the confusion is terminology. Column A, B, and C are distinctly Excel terms.
Excel has "columns and rows" while Access has "fields and records".

Oops... I missed that part, Thanks for letting me know... I used to work with Excel and recently got work with Access and learning it!
 
Upvote 0
Oops... I missed that part, Thanks for letting me know... I used to work with Excel and recently got work with Access and learning it!
No problem! I figured you were probably an Access noob, so just trying to help you learn the terminology to help reduce confusion going forward.
:)
 
Upvote 0

Forum statistics

Threads
1,221,848
Messages
6,162,419
Members
451,765
Latest member
craigvan888

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