Need to extract random data using set criteria...

dance621

New Member
Joined
Sep 14, 2006
Messages
1
Hi,

I am trying to generate html files using data on an excel sheet. I have had quite a lot of success with this in the past using macros and functions etc. But in the past the data used to create an html file has always been in one row. eg 100 rows of data would create 100 html files. The excel datasheet contains data on paintings eg "painting name", "size", "artist" "image link" which is then all combined into an html file. Each row of data is about a different painting...

html file 1: painting_row1 & "by" & artist_data_row1 "size:" size_data_row1
html file 2: painting_row2 & "by" & artist_data_row2 "size:" size_data_row2

What I am trying to do not is create an html file that uses data from several rows. The best way to explain the problem I am having is to explain the desired end product. I want an html file with data about several "paintings".

eg:

Html file: artist_data_row1 & "painted" & painting_row1 & "and" & painting_row6 & "and" & painting_row34


So if an Artist has painted 23 paintings then I want to gather the data from the relevant rows. I am not sure how to do this.

More confusing for me is that I am not sure how to limit the data being gathered eg. If there are 23 paintings by an artist I only want data from 10. I would prefer the 10 to be randomly selected from the 23 but that is not essential.

Can I do stuff like this with functions and macros in excel or do I need to start programming?

Thanks, James
:eek:
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,136,584
Messages
5,676,659
Members
419,638
Latest member
GlenMc52

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
Top