defining cell value based on conditions.VBA of Formula

kshitij_dch

Active Member
Joined
Apr 1, 2012
Messages
362
Office Version
  1. 365
  2. 2016
  3. 2007
Platform
  1. 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"

AGAHAIAJ
DisbursedIN12345
DisbursedIN98786

<tbody>
</tbody>







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"

AGAHAIAJ
Approved Today#N/A8/25/2017
Approved Today#N/A8/25/2017

<tbody>
</tbody>







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"

AGAHAIAJ
Approved But not Disbursed12/25/2016
Approved But not Disbursed10/25/2015

<tbody>
</tbody>









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 .
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
i am getting error in this formula ?


=IF(ISERROR(SEARCH("*IN*",AH1,1)),"","Disbursed"),IF(ISERROR(SEARCH("*Today()*",AI1,1)),"","WC Approved Today")
 
Upvote 0
I have done it for current date .


HTML:
Sub FindDate()
For Each cell In ActiveSheet.Range("A1:A10")   
If cell.Value = [Today()] Then    
cell.Select
ActiveCell.Offset(0, 1).Value = "WC Approved"    
End If
Next
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,945
Messages
6,127,851
Members
449,411
Latest member
adunn_23

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