Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 342
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select a cell based on an other cell's value wally_91 Excel Worksheet Functions 4 March 13th 08 01:24 AM
How do I populate a cell with another cell's value based on condit M Enfroy Excel Worksheet Functions 2 January 7th 06 01:52 AM
Creating a conditional format for a cell based on another cell's v steve-o Excel Discussion (Misc queries) 2 October 26th 05 03:51 PM
Conditional Formating for a cell based on another cell's value steve-o Excel Discussion (Misc queries) 1 October 6th 05 09:50 PM
Macro to Increment a Cell's Value By 1 Dave[_25_] Excel Programming 2 August 10th 03 09:33 PM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"