Question Check if row is valid based on multiple criteria from range...

JMHenriques

New Member
Joined
Aug 4, 2015
Messages
3
Hello everyone,

I used excel a lot but for the last couple of years not so much and it seems I'm a little to dumb for this
smile.gif


Basically I have raw data from a time management program that when corrections are made new records are created, first the number of hours in the original entry is subtracted, and them a new row is added with the new information.

So I would get the following output from a single correction.

CheckIfValid.xlsx
ABCDEFG
1NUMBER_OF_HOURSTYPE_OF_HOURSTIME_STATUS_DATEOvertime detailsDATE_Time_WritingNameHelper column
23.00Overtime weekday29 March 20213/1/2021John DoeDelete
35.00Overtime weekend29 March 20213/1/2021John DoeKeep
48.00Regular time29 March 20213/1/2021John DoeKeep
5-3.00Overtime weekday20 April 20213/1/2021John DoeDelete
63.00Overtime weekday20 April 2021Overtime reason…3/1/2021John DoeKeep
After



In the example above we see that the first entry in yellow for Name "John Doe" made on the DATE_Time_Writing "3/1/2021" with NUMBER_OF_HOURS of "3.00" had a correction made on the 20th of April (column TIME_STATUS_DATE) were it was subtracted the 3 hours. Them, in the last line in green we see the new record with the 3 hours with the missing information in column "Overtime Details".

What I need is a helper column like in the example that tell me the rows to keep and to delete... I'm trying a lot of different approaches using arrays and so on but until now with no luck... I know I have to somehow check if the DATE_Time_Writing is the same for the same Name and them check if there was a subtraction made and also... confirm the new corrected entry... but cannot see a possible logic to do this...

If anyone could help me out with a possible solution or just point me in the right direction it would be wonderful
smile.gif
 

Attachments

  • ExcelHelp.PNG
    ExcelHelp.PNG
    15.2 KB · Views: 1

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0

Forum statistics

Threads
1,214,659
Messages
6,120,786
Members
448,992
Latest member
prabhuk279

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