If/Then formula to copy down a row of data

misshelby

New Member
Joined
Jul 7, 2008
Messages
2
Hi,

I'm trying to create a formula that will copy all data in a row down to a new row, only if a certain criteria is met (as in win/lose, yes/no etc), else a new line is created with no copied data.

The rows also need to be numbered. For example, if the certain criteria is met, then a new row is created, all data copied down and the first cell of the row is now row "2". However, if the criteria is not met, the new row has no copied data and the new row is now row "1" again (back to the start of the pattern, so to speak).

If anyone can provide help on this I'd really appreciate it!.:confused:
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi
A little more info. would have been helpful
Assuming row 6 has data
slno, result, Amount
6, Win , $100
A7 = if(B6="win", A6+1,"") ie if b6 has win, 1 will be added to A6
C7 = "if(A6<> "", C6,"") ie if A6 is not blank it will copy C6
Try it
Ravi

6
 
Upvote 0
Thanks Ravi,

Will give it a go. I tried to give as much info as possible. Will try be more descriptive in future!

Thanks for the tip. Appreciate your help.:)

Shell.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top