简体   繁体   中英

How to make a chart with rows based on cell value?

Is it possible to make a chart (or a column in my case) that would fill in a certain number of rows based on a cell value.

For example, in my file I have:

Alex  5
Josh  3

Normally I would be doing this manually but what I want as output is the following (and this can be the same worksheet doesn't matter):

Alex  Date
Alex  Date
Alex  Date
Alex  Date
Alex  Date
Josh  Date
Josh  Date
Josh  Date

Where the value next to a name determines how many times that person's name shows up in the chart/column, followed by the next person's name with the number of times based on the value next to the name. Date would just be "today's date" or whatever date I happened to be working on this sheet. Ideally, this would just happen automatically. Possible without a macro? I can also try a macro for this, but I have zero experience with that.

You could use the following formula in every cell of a new column (in the same table):

=COUNTIF($A$1:$A$8;A2)  

This won't give you a new table, just an expansion of the existing table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM