mopui.blogg.se

If then formula with multiple conditions
If then formula with multiple conditions









That did work even with 1400+ rows of data. Range("FH" & x & ":GL" & x).Copy Destination:=Range("BTY" & x & ":BVC" & x) 'Copy FH:GL to BTY:BVC - Change as needed Range("DT" & x & ":EX" & x).Copy Destination:=Range("BQW" & x & ":BSA" & x) 'Copy DT:EX to BQW:BSA - Change as needed If Range("AJI" & x) vbNullString And ((Range("BPM" & x) = vbNullString And Range("BPN" & x) = vbNullString) Or Range("BPM" & x) = "Yes") Then 'If column AJI is NOT blank and columns BPM and BPN ARE blank or BPM has "Yes" in it, then copy the data If starting row needs to be something else, change this number I tested it with your sample sheet and it looks to me like everything is working.ĭim DataFinalRow As Long 'Last row of your dataĭataFinalRow = ActiveSheet.Cells(Rows.Count, 945).End(xlUp).Row 'Find the final row of dataįor x = 5 To DataFinalRow 'Starting row is 5. Never in my life have I seen a spreadsheet with so many columns! Must be some serious amounts of data. If not, I'm happy to get whatever help on my original request. I'm just wondering if I can combine that aspect along with 2) - my original request. Basically, the other macros have already accomplished part 1) so that part is technically already taken care of. Hope this makes sense - difficult to explain. should be carried over not only 1) if there is a "Yes" in column BPM, but 2) if AJI is not blank, and if BPM:BPN are blank. Is there a macro/formula that can do the following: 1) IF AJI is not blank, 2a) AND if BPM:BPN is blank, OR 2b) BPM contains "Yes", 3) THEN paste data in the section beginning with DT and FH into sections beginning BQW and BTY respectively. While looking at this though, I realized I may need a more efficient macro/formula that would do two things. I also hid the majority of the unnecessary columns. And you'll see that it is column AJI that I need referenced. Basically, the data in the bottom two rows needs to be pasted/duplicated in those two sections beginning with columns BQW and BTY.

if then formula with multiple conditions if then formula with multiple conditions

Re: if then formula with multiple conditions - blank, nonblank, etc.











If then formula with multiple conditions