Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. Here are the formulas... one is from source file that was given to me, the other is the formula copied over:
  2. =IF(AND($V2>0, OR($W2<>0,$X2<>0,$R2<>0,$S2<>0)),IF((ABS($W2)+ABS($R2))<>0, ((ABS((ABS($W2)+ABS($R2))*((ABS($I2)+ABS($L2)+ABS($T2))/(ABS($G2)+ABS($J2)+ABS($R2))))*_junkRate)+$X2)/$V2, $X2/$V2),IF((ABS($W2)+ABS($R2))<>0, ((ABS((ABS($W2)+ABS($R2))*((ABS($I2)+ABS($L2)+ABS($T2))/(ABS($G2)+ABS($J2)+ABS($R2))))*_junkRate)+$X2)/ABS(ABS($W2)+ABS($R2)), 0))
  3. =IF(AND($V2>0, OR($W2<>0,$X2<>0,$R2<>0,$S2<>0)),IF((ABS($W2)+ABS($R2))<>0, ((ABS((ABS($W2)+ABS($R2))*((ABS($I2)+ABS($L2)+ABS($T2))/(ABS($G2)+ABS($J2)+ABS($R2))))*_junkRate)+$X2)/$V2, $X2/$V2),IF((ABS($W2)+ABS($R2))<>0, ((ABS((ABS($W2)+ABS($R2))*((ABS($I2)+ABS($L2)+ABS($T2))/(ABS($G2)+ABS($J2)+ABS($R2))))*_junkRate)+$X2)/ABS(ABS($W2)+ABS($R2)), 0))
  4.  
  5.  
  6. The lines of code that do all the copying over in VBA are :
  7.  
  8. 'populate margin analyisis report data
  9. wb.Sheets(JUNKSHEET).Range("A1:T" & junkEnd).Value = junk.Range("A1:T" & junkEnd).Value
  10. junk.Range("V1:Y" & junkEnd).Copy
  11. wb.Sheets(JUNKSHEET).Range("V1:Y" & junkEnd).PasteSpecial xlPasteFormulas
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement