Need to Copy Date Field Across Range Based on Criteria

manishc1989

New Member
Joined
Aug 11, 2013
Messages
32
I fetch a report in the below format. I want date value to be copied in column C.
For an example : First group of data is related to 6/8/2018 in which I need date to be copied in corresponding cell to "Group Value" till last ID given in that group or before the next date comes in and so on.
Data format is fixed and there is no blank rows. I have a option of doing it only Excel formulas because I am restricted to use any macros on the source file.

The purpose of doing it to calculate the issues on the given date, for which each time I have to manually copy and paste the date values.

I have tried few solutions such cell function which reads the date format as "D4", but didn't fulfill requirement.

Please suggest a workaround to this problem.

Sample Data:
Column AColumn B
Group Value1234
Dates:6/8/2018
Defined Value=
Employee NameIssues Handled
Totals:20
ID0010
ID0020
ID0030
Group Value1234
Dates:6/9/2018
Defined Value=
Defined Value 2=
Employee NameIssues Handled
Totals:15
ID0080
ID0090
ID0101
Group Value1234
Dates:6/10/2018
Defined Value=
Defined Value 2=
Employee NameIssues Handled
Totals:17
ID0031
ID0040
ID0050
Skill:1451
Dates:6/11/2018
Defined Value=
Defined Value 2=
Employee NameIssues Handled
Totals:31
ID0041
ID0050
ID0060

<colgroup><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Re: Need to Copy Date Field Across Range Based on Creteria

This worked for me as long as the Date row is the next row after Group value in each set;

Code:
=IF(A2="Group Value",OFFSET(A2,1,1),OFFSET(A2,-1,2))
 
Upvote 0
Re: Need to Copy Date Field Across Range Based on Creteria

This worked for me as long as the Date row is the next row after Group value in each set;

Code:
=IF(A2="Group Value",OFFSET(A2,1,1),OFFSET(A2,-1,2))

Thanks Rasghul. It worked awesomely well . I could not think of this simple solution. Again thanks for this truly genious solution.
 
Last edited:
Upvote 0
Re: Need to Copy Date Field Across Range Based on Creteria

You're welcome mate
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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