handysmurf
Board Regular
- Joined
- Jan 17, 2015
- Messages
- 114
- Office Version
- 365
- Platform
- Windows
ok this does not work but I'll post it so you can see what I'm trying to do, returns #REF
"=IF(OR(W886="cp",W886="f",W886="m",W886="o",W886="of",W886="sf"),MAX(AH$5:ROW()-1)+1,"")"
If you don't follow what that is trying to do... I keep track of mileage and expenses for a business vehicle. I link receipts for those expenses and give the receipt a number so I can clearly reference a specific receipt on reports. So the idea is that the formula automatically inserts a number if the line item is an expense and numbers them sequentially. Right now the max part is "MAX(AH$5:AH[row above])+1" but if I have to move around a line then it gets all screwed up and I am trying to avoid this with a formula. I guess because I'm moving and inserting the row it screws it up.
TIA
"=IF(OR(W886="cp",W886="f",W886="m",W886="o",W886="of",W886="sf"),MAX(AH$5:ROW()-1)+1,"")"
If you don't follow what that is trying to do... I keep track of mileage and expenses for a business vehicle. I link receipts for those expenses and give the receipt a number so I can clearly reference a specific receipt on reports. So the idea is that the formula automatically inserts a number if the line item is an expense and numbers them sequentially. Right now the max part is "MAX(AH$5:AH[row above])+1" but if I have to move around a line then it gets all screwed up and I am trying to avoid this with a formula. I guess because I'm moving and inserting the row it screws it up.
TIA