Hello everyone,
I'm struggling with trying to create a series of vba "if" statements.
On sheet 3, I have columns (A:T) that will hold values, there will be a maximum of 8 rows that will contain text. However, its not a given that all 8 rows will contain text (it may be 5,6 or 7.) There are 3 colums (F,G,H) whose values I want to retrieve from sheet 2 (that are calculated by forumla). I only want that value if Column A of that particular row has a value within it.
So let me try and explain what I mean if I can by using an if statement (but not with the correct syntax.)
In Sheet 3 IF A2 IS NOT BLANK then Copy value from Sheet 2 Cell B24 and paste into Sheet 3 Cell F2
In Sheet 3 IF A3 IS NOT BLANK then Copy value from Sheet 2 Cell B24 and paste into Sheet 3 Cell F3
In Sheet 3 IF A2 IS NOT BLANK then Copy value from Sheet 2 Cell H20 and paste into Sheet 3 Cell G2
etc etc
I hope you can see where i'm going with this.
I'd do this by a normal cell formula if possible, however within the macro that i'll assign this code to, i'll be clearing the contents of sheet 3 once i've copied this over to a different workbook, and doing this seems to clear the formula within the cell. (Plus I personally find VBA much slicker.)
If anyone can help me i'd appreciate it alot.
Bookmarks