Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
increment cell value based on another cell's value
I have a workbook.
1 sheet I enter a number in one column, and the next column uses vlookup to find the previous cell's value in the second sheet and get the value in the column next to it. Basically it's like: Sheet 1: 12345 vlookup finds value "apple" based on the number in the previous cell 78912 vlookup finds value "cucumber" based on the number in the previous cell Sheet 2: 12345 apple 45678 orange 78912 cucumber I have a macro that automatically prints a required amount of copies of Sheet 1. What I want to do is add a new column in Sheet 2 that counts the amount of times each "product" has been selected. So what I'm saying is that I want to add a function to the printing macro that increments the number in the new third column next to all the products selected in the first sheet. Anybody understand what I'm trying to ask... :-S |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
increment cell value based on another cell's value
I think I understand what you want. If so, you could add code to the print
macro that would cycle through the selected cell on column a, sheet 2 and add one to the value in column c, sheet 2. I assume that you want the values incremented each time the print macro is run. "Rosa Hildur" wrote: I have a workbook. 1 sheet I enter a number in one column, and the next column uses vlookup to find the previous cell's value in the second sheet and get the value in the column next to it. Basically it's like: Sheet 1: 12345 vlookup finds value "apple" based on the number in the previous cell 78912 vlookup finds value "cucumber" based on the number in the previous cell Sheet 2: 12345 apple 45678 orange 78912 cucumber I have a macro that automatically prints a required amount of copies of Sheet 1. What I want to do is add a new column in Sheet 2 that counts the amount of times each "product" has been selected. So what I'm saying is that I want to add a function to the printing macro that increments the number in the new third column next to all the products selected in the first sheet. Anybody understand what I'm trying to ask... :-S |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select a cell based on an other cell's value | Excel Worksheet Functions | |||
How do I populate a cell with another cell's value based on condit | Excel Worksheet Functions | |||
Creating a conditional format for a cell based on another cell's v | Excel Discussion (Misc queries) | |||
Conditional Formating for a cell based on another cell's value | Excel Discussion (Misc queries) | |||
Macro to Increment a Cell's Value By 1 | Excel Programming |