Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I created this macro so it will collect info from 3 cells a put a phrase in
AS2. The data that is on these 3 cells comes form other sheets. (Sheet 1, 2, and 3) What I need this macro to do also is to collect info from 2 cells instead of 3. If the information in cell is RC[-20] is coming from sheet 4. Any suggestions? Sheets("Upload").Select Range("AS2").Select ActiveCell.FormulaR1C1 = _ "=IF(RC[-1]="""","""",RC[-43]&'Sport'!R6C29&'Upload'!RC[-20])" Range("AS2").Select Selection.AutoFill Destination:=Range("AS2:AS500"), Type:=xlFillDefault Range("AS2:AS500").Select |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would get the formula working manually.
After that's done, turn on the macro recorder. Record a macro when you select the cell with the formula, hit F2, then enter. Then stop recording. Then take a look at that code for the formula. Juan Carlos wrote: I created this macro so it will collect info from 3 cells a put a phrase in AS2. The data that is on these 3 cells comes form other sheets. (Sheet 1, 2, and 3) What I need this macro to do also is to collect info from 2 cells instead of 3. If the information in cell is RC[-20] is coming from sheet 4. Any suggestions? Sheets("Upload").Select Range("AS2").Select ActiveCell.FormulaR1C1 = _ "=IF(RC[-1]="""","""",RC[-43]&'Sport'!R6C29&'Upload'!RC[-20])" Range("AS2").Select Selection.AutoFill Destination:=Range("AS2:AS500"), Type:=xlFillDefault Range("AS2:AS500").Select -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dave,
Thank for the feedback, but I dont know what formula to use to make this work. "Dave Peterson" wrote: I would get the formula working manually. After that's done, turn on the macro recorder. Record a macro when you select the cell with the formula, hit F2, then enter. Then stop recording. Then take a look at that code for the formula. Juan Carlos wrote: I created this macro so it will collect info from 3 cells a put a phrase in AS2. The data that is on these 3 cells comes form other sheets. (Sheet 1, 2, and 3) What I need this macro to do also is to collect info from 2 cells instead of 3. If the information in cell is RC[-20] is coming from sheet 4. Any suggestions? Sheets("Upload").Select Range("AS2").Select ActiveCell.FormulaR1C1 = _ "=IF(RC[-1]="""","""",RC[-43]&'Sport'!R6C29&'Upload'!RC[-20])" Range("AS2").Select Selection.AutoFill Destination:=Range("AS2:AS500"), Type:=xlFillDefault Range("AS2:AS500").Select -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe you could either explain it better or experiment manually.
Juan Carlos wrote: Dave, Thank for the feedback, but I dont know what formula to use to make this work. "Dave Peterson" wrote: I would get the formula working manually. After that's done, turn on the macro recorder. Record a macro when you select the cell with the formula, hit F2, then enter. Then stop recording. Then take a look at that code for the formula. Juan Carlos wrote: I created this macro so it will collect info from 3 cells a put a phrase in AS2. The data that is on these 3 cells comes form other sheets. (Sheet 1, 2, and 3) What I need this macro to do also is to collect info from 2 cells instead of 3. If the information in cell is RC[-20] is coming from sheet 4. Any suggestions? Sheets("Upload").Select Range("AS2").Select ActiveCell.FormulaR1C1 = _ "=IF(RC[-1]="""","""",RC[-43]&'Sport'!R6C29&'Upload'!RC[-20])" Range("AS2").Select Selection.AutoFill Destination:=Range("AS2:AS500"), Type:=xlFillDefault Range("AS2:AS500").Select -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Cell A1=123 (Sheet 5)
A2=456 (Sheet 5) A3=789 (Sheet 5) My formula is in A4(Sheet 5) =A1&A2&A3 RESULT IS A4=123456789 The numbers of A1 come from sheet 1 The numbers of A2 come from sheet 2 The numbers of A3 come from sheet 3 The result A4 is in sheet 5 The number in A1 can come from either sheet 1 or sheet 4 What I need is a formula that gives me a different result if the numbers in A1 came from Sheet 4 instead of Sheet 1. The formula will be =A2&A3 and the result will be 456789. and the only condition if where the data is coming from. I hope this is clear enough. Thanks i hope this is clear enoung. thanks "Dave Peterson" wrote: Maybe you could either explain it better or experiment manually. Juan Carlos wrote: Dave, Thank for the feedback, but I donĂ¢‚¬„¢t know what formula to use to make this work. "Dave Peterson" wrote: I would get the formula working manually. After that's done, turn on the macro recorder. Record a macro when you select the cell with the formula, hit F2, then enter. Then stop recording. Then take a look at that code for the formula. Juan Carlos wrote: I created this macro so it will collect info from 3 cells a put a phrase in AS2. The data that is on these 3 cells comes form other sheets. (Sheet 1, 2, and 3) What I need this macro to do also is to collect info from 2 cells instead of 3. If the information in cell is RC[-20] is coming from sheet 4. Any suggestions? Sheets("Upload").Select Range("AS2").Select ActiveCell.FormulaR1C1 = _ "=IF(RC[-1]="""","""",RC[-43]&'Sport'!R6C29&'Upload'!RC[-20])" Range("AS2").Select Selection.AutoFill Destination:=Range("AS2:AS500"), Type:=xlFillDefault Range("AS2:AS500").Select -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe you can use the same rule that A1 uses to determine where to get the
values. But you haven't shared that. Juan Carlos wrote: Cell A1=123 (Sheet 5) A2=456 (Sheet 5) A3=789 (Sheet 5) My formula is in A4(Sheet 5) =A1&A2&A3 RESULT IS A4=123456789 The numbers of A1 come from sheet 1 The numbers of A2 come from sheet 2 The numbers of A3 come from sheet 3 The result A4 is in sheet 5 The number in A1 can come from either sheet 1 or sheet 4 What I need is a formula that gives me a different result if the numbers in A1 came from Sheet 4 instead of Sheet 1. The formula will be =A2&A3 and the result will be 456789. and the only condition if where the data is coming from. I hope this is clear enough. Thanks i hope this is clear enoung. thanks "Dave Peterson" wrote: Maybe you could either explain it better or experiment manually. Juan Carlos wrote: Dave, Thank for the feedback, but I donĂ¢‚¬„¢t know what formula to use to make this work. "Dave Peterson" wrote: I would get the formula working manually. After that's done, turn on the macro recorder. Record a macro when you select the cell with the formula, hit F2, then enter. Then stop recording. Then take a look at that code for the formula. Juan Carlos wrote: I created this macro so it will collect info from 3 cells a put a phrase in AS2. The data that is on these 3 cells comes form other sheets. (Sheet 1, 2, and 3) What I need this macro to do also is to collect info from 2 cells instead of 3. If the information in cell is RC[-20] is coming from sheet 4. Any suggestions? Sheets("Upload").Select Range("AS2").Select ActiveCell.FormulaR1C1 = _ "=IF(RC[-1]="""","""",RC[-43]&'Sport'!R6C29&'Upload'!RC[-20])" Range("AS2").Select Selection.AutoFill Destination:=Range("AS2:AS500"), Type:=xlFillDefault Range("AS2:AS500").Select -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Question | Excel Worksheet Functions | |||
Formula Macro Question | Excel Discussion (Misc queries) | |||
MACRO QUESTION | Excel Discussion (Misc queries) | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
Excel Formula/Worksheet maybe Macro Question | Excel Worksheet Functions |