I currently have a nested IfThen equation for a range of cells where depending on certain words in the first column of data (Which is pasted in by the user) different values are put into the second column of data. So for example, if the word "Ladder" was in B20 the words "allelic ladder" would show up in F20, as well as if the letters "POS" were in B17, the words "Positive control" would show up in F17. I was wondering if there was a way to make a macro in VBA to do this exact thing without having to write it for every individual cell. I've tried doing a Case function using InStr to scan the value of the cell for the different words, but I can only seem to do that for a singular cell and not for a range of cells without rewriting the code for each cell since its looking a specific sting value and not a range of them. If also tried just making a basic If Else macro, but again, I'm not sure how to have it automatically do it for a range of cells. I know I could just loop the macro for the one cell and have it do it for all the others, but I didn't know if there was a way to do it without that.
Attached is a photo of the macro I have and an explanation for what I want to do. I'm not sure if this is possible the the current way I'm trying to do it or if it's even possible at all as I don't really know too much about VBA.
Thanks!
Attached is a photo of the macro I have and an explanation for what I want to do. I'm not sure if this is possible the the current way I'm trying to do it or if it's even possible at all as I don't really know too much about VBA.
Thanks!