Right now this macro fills in A8 with the formula =IF(PCInfo[[#This Row],[Main Mark]]="","",A7,0)
I'm looking to have the cell selected replace $A$8
Also have A7 replaced with the cell above the selected cell
HTML Code:
Right now this macro fills in A8 with the formula =IF(PCInfo[[#This Row],[Main Mark]]="","",A7,0)
I'm looking to have the cell selected replace $A$8
Also have A7 replaced with the cell above the selected cell
HTML Code:
HTML Code:
Make Mom proud: Add to my reputation if I helped out!
Make the Moderators happy: Mark the Thread as Solved if your question was answered!
This code did not work...
I should have examined your text first. Your IF statement has too many arguments.
=IF(test for true, output when true, output when false)
"=IF(PCInfo[[#This Row],[Main Mark]]="","",A7,0)"
test: PCInfo[[#This Row],[Main Mark]]=""
true output: ""
false output: A7
4th unknown output: 0
Perhaps you meant:
Please Login or Register to view this content.
The code that I posted is working fine for me...HTML Code:
Here's a screenshot of the logic behind it...
The issue is not that my code has an error, the issue is that I don't know how to replace the cell values in the code it self
Hence my original questions
1)How can I replace the A8 in $A$8 with the value of the select cell? If selected cell is A10 then $A$10 should appear, or at least let the code process that's the cell selected.
2)How can I replace the A7 with the value of the cell above the selected? If selected cell is A10 then I would like to see A7 turn into A9, or at least have the code process it that way
The reasoning for this is so that any row in this column can hold the value of the formula applied to it when the cell is blank
You don't need that line of code if you want to be able to apply it to any cell selected.
If you instead want to be able to apply it to a range of cells, you can use the Intersect Method:
When using SelectionChange and Change Events, I highly recommend adding the following line:Please Login or Register to view this content.
Which will prevent the procedure from running if you select more than one cell at a time.Please Login or Register to view this content.
Since 'Target' represents the selected cell, Target.Offset(-1) represents the cell above it.
Assuming the 0 in your original post is just a typo, we can use the A7 as the False Output of your IF and swap Target.Offset(-1) in its place with some concatenation.
The following code quits if you select more than one cell, and runs only for cells A2:A10 if you select them.
Please Login or Register to view this content.
Thank you for your help
Thank you for your help
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks