Create alternate line of data

  • Thread starter Thread starter Excel Helps
  • Start date Start date
E

Excel Helps

Hello again,
Is it possible to create alternating lines of data using a function, based
on a preceding line?
I need to add simaler products underneath each line of existing data to add
the wood type oak.

Code Name Wood Wood_Image
A1 Chair Pine pine.jpg

A2 Chair Pine pine.jpg

This line to be added inbetween A1 and A2
A1_OAK Chair Oak oak.jpg

Thanks.
 
You can't do this with a formula, as a formula cannot insert rows -
you would need a macro to do it.

An alternative approach you might be able to take would be to add some
formulae at the bottom of your data, fix the values, and then sort the
table. For example, if your data is currently on rows 2 to 30, then in
row 31 you could have these formulae and values:

A31: =A2&"_OAK"
B31: =B2
C31: OAK
D31: oak.jpg

Then you could copy A31:D31 into rows 32 to 59, and then highlight
A31:D59, click <copy>, then Edit | Paste Special | Values | OK and
<Esc>. Then sort the complete table using column A as the sort field.

Hope this helps.

Pete
 
Glad to be of help.

You could apply the method I suggest by means of a macro, and it
should be quicker if you have a lot of data items (inserting single
rows can be time-consuming).

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top