kshitij_dch
Active Member
- Joined
- Apr 1, 2012
- Messages
- 362
- Office Version
- 365
- 2016
- 2007
- Platform
- Windows
Hello All,
I am working on an excel sheet wherein i have Column AG named 'Final Status' , Column AH which is 'Report' , Column AI which is 'Approved' and Column AJ which is 'Pending'
Column AG is blank , Column AH , AI and AJ have some data (Text and Numbers), I need a macro or if we can set a formula like if condition is met then i need certain text to be written in column AG.(Conditions are many)
For an Example:
1.) in Column AH , IF cell contains Id's Starting with IN12345 then against that ID cell in Column AG will be written as "Disbursed"
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD="align: center"]AG[/TD]
[TD="align: center"]AH[/TD]
[TD="align: center"]AI[/TD]
[TD="align: center"]AJ[/TD]
[/TR]
[TR]
[TD="align: center"]Disbursed[/TD]
[TD="align: center"]IN12345[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Disbursed[/TD]
[TD="align: center"]IN98786[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
2.)In Column AI , IF cell contains Today's Date (Current date) then against that date all cells in column AG will be written as "Approved Today"
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[/TR]
[TR]
[TD="align: center"]AG[/TD]
[TD="align: center"]AH[/TD]
[TD="align: center"]AI[/TD]
[TD="align: center"]AJ[/TD]
[/TR]
[TR]
[TD="align: center"]Approved Today[/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]8/25/2017[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Approved Today[/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]8/25/2017[/TD]
[/TR]
</tbody>[/TABLE]
3.)In column AI , Apart from Today's Date , all the other dates , against dates cells in column AG will be "Approved but not Disbursed"
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD="align: center"]AG[/TD]
[TD="align: center"]AH[/TD]
[TD="align: center"]AI[/TD]
[TD="align: center"]AJ[/TD]
[/TR]
[TR]
[TD="align: center"]Approved But not Disbursed[/TD]
[TD="align: center"][/TD]
[TD="align: center"]12/25/2016[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Approved But not Disbursed[/TD]
[TD="align: center"][/TD]
[TD="align: center"]10/25/2015[/TD]
[/TR]
</tbody>[/TABLE]
Like this i have many conditions , If somebody can help me with a vba code it would be great as i have tried by recording filtering it is not happening .
I am working on an excel sheet wherein i have Column AG named 'Final Status' , Column AH which is 'Report' , Column AI which is 'Approved' and Column AJ which is 'Pending'
Column AG is blank , Column AH , AI and AJ have some data (Text and Numbers), I need a macro or if we can set a formula like if condition is met then i need certain text to be written in column AG.(Conditions are many)
For an Example:
1.) in Column AH , IF cell contains Id's Starting with IN12345 then against that ID cell in Column AG will be written as "Disbursed"
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD="align: center"]AG[/TD]
[TD="align: center"]AH[/TD]
[TD="align: center"]AI[/TD]
[TD="align: center"]AJ[/TD]
[/TR]
[TR]
[TD="align: center"]Disbursed[/TD]
[TD="align: center"]IN12345[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Disbursed[/TD]
[TD="align: center"]IN98786[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
2.)In Column AI , IF cell contains Today's Date (Current date) then against that date all cells in column AG will be written as "Approved Today"
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[/TR]
[TR]
[TD="align: center"]AG[/TD]
[TD="align: center"]AH[/TD]
[TD="align: center"]AI[/TD]
[TD="align: center"]AJ[/TD]
[/TR]
[TR]
[TD="align: center"]Approved Today[/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]8/25/2017[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Approved Today[/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]8/25/2017[/TD]
[/TR]
</tbody>[/TABLE]
3.)In column AI , Apart from Today's Date , all the other dates , against dates cells in column AG will be "Approved but not Disbursed"
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD="align: center"]AG[/TD]
[TD="align: center"]AH[/TD]
[TD="align: center"]AI[/TD]
[TD="align: center"]AJ[/TD]
[/TR]
[TR]
[TD="align: center"]Approved But not Disbursed[/TD]
[TD="align: center"][/TD]
[TD="align: center"]12/25/2016[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Approved But not Disbursed[/TD]
[TD="align: center"][/TD]
[TD="align: center"]10/25/2015[/TD]
[/TR]
</tbody>[/TABLE]
Like this i have many conditions , If somebody can help me with a vba code it would be great as i have tried by recording filtering it is not happening .