Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2003 - Copy data into other cells based on value?

Status
Not open for further replies.

Maillme

Technical User
Mar 11, 2003
186
NL
Hi there,

I have a spreadsheet which has income and outgoing expenditure - fairly simple.

Income has:

- Amount (A Column)
- Date (B Column)
- Description (C Column)
- Ringfenced (D Column)

The D column is a choice between yes or no - i have a data validation list to get these choices from a named range.

If the user selected the option "Yes" for ringfenced, so lets say D3 = Yes; I would like to copy the row of data to another row within my spreadsheet.

I don't know the code (hence im asking), but ill talk it out:

If Cell D2 is equal to "yes"
copy A2, B2, C2 to Cells F3, G3, H3

My problem is:

a) I dont know the code
b) How can i ensure that this will run throughout each row (there will only really be about 40 rows maximum). E.g. if im on A23, B23, C23 - I'd like to copy to F23, G23, H23

Any help you can give would be greatly appreciated.

thanks,
neil
 


Hi,

The quick answer is...
[tt]
If Cell D2 is equal to "yes"
copy A2, B2, C2 to Cells F3, G3, H3
F3: =IF($D2="yes",A2,"")
[/tt]
Copy F3 and Paste into G3:H3.

The LONG: what is the purpose of columns F:H?


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top