blacklabel
Board Regular
- Joined
- Aug 30, 2006
- Messages
- 144
I'm just joined the board today. I looked around for a day to make sure I wasn't repeating any issue already discussed. Here goes:
I have an Excel document in which consists of columns A-R. Columns G and H are what I'm trying to manipulate in a macro. The explanation I need to define in code is If Column H=#N/A then replace the #N/A with the previous cell in column H that is a number, but only if the number in column G is the same. I'll put an example:
G H
1 10
1 10
1 #N/A
2 20
The #N/A would need to be automatically changed to 10 since that's what the previous cell is equal to in that column. If the value in Column G is not the same in the previous cell, then I need the macro to do nothing. I hope I explained that enough. If there's any confusion please let me know. I have a couple of more issues with this situation but I wanted to take them one step at a time.
Thanks so much in advance.
I have an Excel document in which consists of columns A-R. Columns G and H are what I'm trying to manipulate in a macro. The explanation I need to define in code is If Column H=#N/A then replace the #N/A with the previous cell in column H that is a number, but only if the number in column G is the same. I'll put an example:
G H
1 10
1 10
1 #N/A
2 20
The #N/A would need to be automatically changed to 10 since that's what the previous cell is equal to in that column. If the value in Column G is not the same in the previous cell, then I need the macro to do nothing. I hope I explained that enough. If there's any confusion please let me know. I have a couple of more issues with this situation but I wanted to take them one step at a time.
Thanks so much in advance.