PDA

View Full Version : [SLEEPER:] Compare two sheets and Conditions



Foncesa
06-30-2024, 11:09 AM
Hi,
1.Both sheets have columns A to E. Sheet NDS column E value will be searched in Sheet DATA in column E once this is matched then


2. Column D search CR Total or DR Total then sheet NDS Column C Cell Value will be searched in Sheet Data column C and


3. Matched row will moved from Sheet Data to Sheet NDS next row


4.This moved value will be cross checked with Column D grouped 1st row if its DR then moved cell will be CR and vice versa for CR then DR.

Sample worksheet is attached for more details.
Thanks in advance.

Aussiebear
06-30-2024, 02:17 PM
Sorry but you have me somewhat confused here with your explanation. For what I understand of your request;

1). Compare worksheet NDS Column E (Code) to worksheet DATA Column E (Code) and if matched, then
2). For each DR Total & CR Total in worksheet NDS, Compare worksheet NDS Column C (Amount) to Worksheet Data Column C (Amount) and If matched, then
3). Copy that matched row in worksheet DATA to worksheet NDS (next row), then
4). Convert the DR value to CR or CR to DR.

What I don't understand here is that you say you want a Matched row to be moved to a sheet where it already exists.
The matched row contains a date value in worksheet DATA but not in worksheet NDS, so something has to give.
The matched row layouts are not the same,

peterparkerr
07-03-2024, 09:15 PM
Hi,
1.Both sheets have columns A to E. Sheet NDS column E value will be searched in Sheet DATA in column E once this is matched then


2. Column D search CR Total or DR Total then sheet NDS Column C Cell Value will be searched in Sheet Data column C and


3. Matched row will moved from Sheet Data to Sheet NDS next row


4.This moved value will be cross checked with Column D grouped 1st row if its DR then moved cell will be CR and vice versa for CR then DR.

Sample worksheet is attached for more details.
Thanks in advance.

georgiboy
07-08-2024, 03:54 AM
Have a look at the attached and see if the code does what you need it to.

Foncesa
07-20-2024, 11:55 AM
Thanks for reply, still 2 points needs to be covered,
1. It compares one single entry whereas it will do till the last row
2. Match entry will be moved instead of copying

Thanks.