Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have a workbook with four sheets in it. On each of the first three sheets,
located in cells F33:F52 and N33:N52 are unit prices. The fourth sheet is blank. I would like to know if (and how) a macro can be created that would look at the unit price in cell F33 of Sheet 1, then compare it to the unit price in F33 of Sheet 2 and F33 of Sheet three, decide which is the lowest, and place it in the cell F33 of sheet 4. Then, look at the next cell (F34) and do the same thing, etc. I am an absolute novie with VBA, but really need this. It would make my life so much easier. Thanks. |
#3
![]() |
|||
|
|||
![]()
In sheet4, F33 enter
=MIN(sheet1!F33,sheet2!F33,sheet3!F33) Highlight the formula then highlight cells down and hit control d which copies the formula down. If you need to fill cells up highlight those cell...click on edit...click on Fill....click on Up. "Mr. Smiley" wrote: I have a workbook with four sheets in it. On each of the first three sheets, located in cells F33:F52 and N33:N52 are unit prices. The fourth sheet is blank. I would like to know if (and how) a macro can be created that would look at the unit price in cell F33 of Sheet 1, then compare it to the unit price in F33 of Sheet 2 and F33 of Sheet three, decide which is the lowest, and place it in the cell F33 of sheet 4. Then, look at the next cell (F34) and do the same thing, etc. I am an absolute novie with VBA, but really need this. It would make my life so much easier. Thanks. |
#4
![]() |
|||
|
|||
![]()
In , Mike told us
an interesting story. My reply to this story is at the bottom of this message. In sheet4, F33 enter =MIN(sheet1!F33,sheet2!F33,sheet3!F33) Highlight the formula then highlight cells down and hit control d which copies the formula down. If you need to fill cells up highlight those cell...click on edit...click on Fill....click on Up. You weren't supposed to answer! You're not an MVP! ;-) -- Amedee Van Gasse |
#5
![]() |
|||
|
|||
![]()
Mike, thanks for your help. I'll try it. To Don and Amedee, get over
yourselves!!!!! I only put MVP in the subject to show that I thought this was a hard problem, not that the problem was for an actual MVP. There are more egos in this discussion group that good help. Now be gone!!!!!!!! "Mike" wrote: In sheet4, F33 enter =MIN(sheet1!F33,sheet2!F33,sheet3!F33) Highlight the formula then highlight cells down and hit control d which copies the formula down. If you need to fill cells up highlight those cell...click on edit...click on Fill....click on Up. "Mr. Smiley" wrote: I have a workbook with four sheets in it. On each of the first three sheets, located in cells F33:F52 and N33:N52 are unit prices. The fourth sheet is blank. I would like to know if (and how) a macro can be created that would look at the unit price in cell F33 of Sheet 1, then compare it to the unit price in F33 of Sheet 2 and F33 of Sheet three, decide which is the lowest, and place it in the cell F33 of sheet 4. Then, look at the next cell (F34) and do the same thing, etc. I am an absolute novie with VBA, but really need this. It would make my life so much easier. Thanks. |
#6
![]() |
|||
|
|||
![]()
Mike, your formula worked. Thanks. Let me ask you, do you know if there is
a way to incorporate within this code which sheet has the lowest price? For example, if sheet 1, cell F33 has a value of 4 (and the cell is blue), sheet 2 F33 has a value of 3 (and the cell is red) and sheet 3 F33 has a value of 1 (and the cell is yellow), can I make it so that it puts the min value in sheet 4 (1) and is the color of the cell, or has a column beside of it stating which sheet the value came from? Thanks. "Mike" wrote: In sheet4, F33 enter =MIN(sheet1!F33,sheet2!F33,sheet3!F33) Highlight the formula then highlight cells down and hit control d which copies the formula down. If you need to fill cells up highlight those cell...click on edit...click on Fill....click on Up. "Mr. Smiley" wrote: I have a workbook with four sheets in it. On each of the first three sheets, located in cells F33:F52 and N33:N52 are unit prices. The fourth sheet is blank. I would like to know if (and how) a macro can be created that would look at the unit price in cell F33 of Sheet 1, then compare it to the unit price in F33 of Sheet 2 and F33 of Sheet three, decide which is the lowest, and place it in the cell F33 of sheet 4. Then, look at the next cell (F34) and do the same thing, etc. I am an absolute novie with VBA, but really need this. It would make my life so much easier. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving Excel using Macro | Excel Discussion (Misc queries) | |||
Button fails to call macro when open an Excel via Intranet | Excel Discussion (Misc queries) | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) | |||
Problem Editing Macro in Shared Excel File | Excel Discussion (Misc queries) | |||
Macro in Excel 2002 to save a workbook to a FTP location | Excel Discussion (Misc queries) |