very new to VBA (this is day 2). Most of my experience so far is a mix of code from over the web and a great help on a previous question on here. So i have a new question. I am importing data from a mass of excel sheets into one consolidated sheet as a record. This bit works fine, it then gets copied onto a seperate sheet in a format that suits the user. However, i would like a formula to come across to, i dont know how to do this at all. I would like it to be applied to be each row and be specific for that row.
Sheets("TrackRecord").Range("B2:B9999").Value = Sheets("Data").Range("D2:D9999").Value
'Copy and paste for Quote Number
Sheets("TrackRecord").Range("C2:C9999").Value = Sheets("Data").Range("N2:N9999").Value
'Copy and paste for Cable OD
Sheets("TrackRecord").Range("E2:E9999").Value = Sheets("Data").Range("P2:P9999").Value
'Copy and paste for Wall Thickness Proposed
Sheets("TrackRecord").Range("F2:F9999").Value = Sheets("Data").Range("Q2:Q9999").Value
'Copy and paste for Wall Thickness Override
In the above i would like an IF statement to be pasted on each row in Column D which basically says if(F2<>"",F2,E2) and then this be sequential for each row. Ultimately i would like not to bring the bottom two lines through and do this before it even gets on the page, if that could be done it would be amazing!
Quick question i need it to start in row 2 but i dont want it to end, do i have to put D9999 or can i do something else for an infinite level? Sorry.
Thank you for reading this far, an thank you in advance for your help :)