Hello,
I'm quite new to the VBA game and I've been stuck on a problem.
I scrolled though the forum and did not fully find the way of solving my issue.
To be clear, I would like the Macro to insert values in a xC (cell in the column C), IF the cell xA is blank (on the same row but column A) and IF right (xB;3) is a certain value (let's say 910), based on the last two characters of xB.
This macro should also not change the values in C column (because they might be) if A is not blank.
For example here, B7 being blank and right (C7;3) being "910", I would love to see the C7 cell being "01" as per the two last characters of B7.
You'll find below the mini-sheet who may help you see clearly.
English not being my first language, I hope that I was clear !
Thanks in advance!
I'm quite new to the VBA game and I've been stuck on a problem.
I scrolled though the forum and did not fully find the way of solving my issue.
To be clear, I would like the Macro to insert values in a xC (cell in the column C), IF the cell xA is blank (on the same row but column A) and IF right (xB;3) is a certain value (let's say 910), based on the last two characters of xB.
This macro should also not change the values in C column (because they might be) if A is not blank.
For example here, B7 being blank and right (C7;3) being "910", I would love to see the C7 cell being "01" as per the two last characters of B7.
You'll find below the mini-sheet who may help you see clearly.
Book1.xlsx | |||||
---|---|---|---|---|---|
B | C | D | |||
2 | 342 | 34223 | 23 | ||
3 | 556 | 55619 | 19 | ||
4 | 485 | 48500 | 00 | ||
5 | 961 | 96169 | 69 | ||
6 | 458 | 45881 | 81 | ||
7 | 91001 | ||||
8 | 91003 | ||||
9 | 99101 | ||||
10 | 108 | 10826 | 26 | ||
11 | 570 | 57021 | 21 | ||
12 | 188 | 18838 | 38 | ||
13 | 623 | 62343 | 43 | ||
14 | 112 | 11229 | 29 | ||
Sheet1 |
English not being my first language, I hope that I was clear !
Thanks in advance!