MurdochQuill
Board Regular
- Joined
- Nov 21, 2020
- Messages
- 84
- Office Version
- 365
- Platform
- Windows
Hi.
I have a difficult one for you all.
I'm trying to translate some data to different columns in VBA based on some complex criteria. Not sure on the formatting to search this stuff so hopefully someone can help !
What I would like to do is feed in raw data ID's under Name/Desc/Type in F column. I would like to then match them to the A, B and C columns, then I would like to copy/paste the G column "Value" into the corresponding D "Value" column where there is a match.
Here is an example sheet:
So here are a bunch of rules I need to work out when copying over:
I have a difficult one for you all.
I'm trying to translate some data to different columns in VBA based on some complex criteria. Not sure on the formatting to search this stuff so hopefully someone can help !
What I would like to do is feed in raw data ID's under Name/Desc/Type in F column. I would like to then match them to the A, B and C columns, then I would like to copy/paste the G column "Value" into the corresponding D "Value" column where there is a match.
Here is an example sheet:
Book1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Name | Description | TYPE | VALUE: | Name/DESC/TYPE | Value: | |||
2 | AA | G3 | YTR5-G4 | 12 | |||||
3 | DD | CC | G3 | WER3-G3 | 12 | ||||
4 | G564 | CC | G3 | JHG6-G6 | 33 | ||||
5 | BB | G3 | JHG6-G5 | 19 | |||||
6 | G544 | CC | G3 | I78-G6 | 45 | ||||
7 | G55 | CC | G3 | I78-G3 | 324 | ||||
8 | G55 | CC | G6 | HFH4-G5 | 560 | ||||
9 | I78 | CC | G3 | G564-G3 | 43 | ||||
10 | I78 | CC | G6 | G55-G6 | 45 | ||||
11 | JHG6 | CC | G5 | G55-G3 | 345 | ||||
12 | JHG6 | CC | G6 | G544-G3 | 55 | ||||
13 | HFH4 | CC | G5 | FGH4-G3 | 2 | ||||
14 | 456D | CC | G5 | DD-G3 | 36 | ||||
15 | 456S | CC | G3 | BB-G3 | 56 | ||||
16 | WER3 | CC | G3 | AA-G3 | 68 | ||||
17 | FGH4 | CC | G3 | 456S-G3 | 3 | ||||
18 | YTR5 | CC | G4 | 456D-G5 | 4 | ||||
Sheet1 |
So here are a bunch of rules I need to work out when copying over:
- Description AA will always ignore any input name, but as long as we match the description that's ok.
- Description BB same as above.
- Description CC will always need to have name matched on column F before the "-XX" suffix.
- Type will always be a suffix in the form of "-XX".
- Both name and suffix need to match in order to send from column G to column D.
Book1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Name | Description | TYPE | VALUE: | Name/DESC/TYPE | Value: | |||
2 | AA | G3 | 68 | YTR5-G4 | 12 | ||||
3 | DD | CC | G3 | 36 | WER3-G3 | 12 | |||
4 | G564 | CC | G3 | 43 | JHG6-G6 | 33 | |||
5 | BB | G3 | 56 | JHG6-G5 | 19 | ||||
6 | G544 | CC | G3 | 55 | I78-G6 | 45 | |||
7 | G55 | CC | G3 | 345 | I78-G3 | 324 | |||
8 | G55 | CC | G6 | 45 | HFH4-G5 | 560 | |||
9 | I78 | CC | G3 | 324 | G564-G3 | 43 | |||
10 | I78 | CC | G6 | 45 | G55-G6 | 45 | |||
11 | JHG6 | CC | G5 | 19 | G55-G3 | 345 | |||
12 | JHG6 | CC | G6 | 33 | G544-G3 | 55 | |||
13 | HFH4 | CC | G5 | 560 | FGH4-G3 | 2 | |||
14 | 456D | CC | G5 | 4 | DD-G3 | 36 | |||
15 | 456S | CC | G3 | 3 | BB-G3 | 56 | |||
16 | WER3 | CC | G3 | 12 | AA-G3 | 68 | |||
17 | FGH4 | CC | G3 | 2 | 456S-G3 | 3 | |||
18 | YTR5 | CC | G4 | 12 | 456D-G5 | 4 | |||
Sheet1 |