jufglanville
New Member
- Joined
- Sep 11, 2017
- Messages
- 23
Hi all,
I'm looking for what I presume is an If statement where I have two columns formed from another macro. These columns contain dates, but quite often one of the columns will be empty and the other will have a date. I'm looking to merge the two columns into one and have thought the easiest way would be to do an If statement where the 'Parent' column is 'A' and if the 'Parent' column is empty then the macro will place the data from column 'B' into it.
I know this can be done with a simple formula as shown below but want this to be vba code and run automatically with other processes.
=IF(A4<>"",A4,B4)
I imagine there may need to be a loop function as well? though not too sure as the number of rows will every vary every time I come to run the process.
Thanks
I'm looking for what I presume is an If statement where I have two columns formed from another macro. These columns contain dates, but quite often one of the columns will be empty and the other will have a date. I'm looking to merge the two columns into one and have thought the easiest way would be to do an If statement where the 'Parent' column is 'A' and if the 'Parent' column is empty then the macro will place the data from column 'B' into it.
I know this can be done with a simple formula as shown below but want this to be vba code and run automatically with other processes.
=IF(A4<>"",A4,B4)
I imagine there may need to be a loop function as well? though not too sure as the number of rows will every vary every time I come to run the process.
Thanks